//
//  LevelMaker.m
//  StarBugs
//
//  Created by ?? ? on 12/22/11.
//  Copyright 2011 antisword@playorca.com. All rights reserved.
//

#include  "Layer/LevelMaker.h"
#include "Object/Object.h"
#include "Util/ImageManager.h"
#include "Util/DataBase.h"
using namespace cocos2d;

#define PTM_RATIO 32.f


int maxStage[] =
{
    15, 15, 15, 15, 15,
    15,
};

#pragma mark chapter1
int chapter1data[][128][5] = {
	{{8,69,405,0,0},
        {8,246,406,0,0},
        {8,69,295,0,0},
        {8,245,295,0,0},
        {8,68,190,0,0},
        {8,245,191,0,0},
        {0,159,169,0,0},
        {0,159,235,0,0},
        {0,159,299,0,0},
        {0,159,369,0,0},
        {0,159,441,0,0},
        {-1}},//1
	{
        {8,254,254,0,0},
        {8,178,330,0,0},
        {8,178,190,0,0},
        {8,98,398,0,0},
        {8,98,138,0,0},
        {0,206,134,0,0},
        {0,258,186,0,0},
        {0,306,246,0,0},
        {0,258,306,0,0},
        {0,206,362,0,0},
        {0,150,414,0,0},
        {-1}
	},//2
	{
        {29,14,278,0,0},
        {16,218,338,0,0},
        {16,218,298,0,0},
        {16,218,257,0,0},
        {16,218,218,0,0},
        {16,286,218,0,0},
        {16,286,258,0,0},
        {16,286,298,0,0},
        {16,286,338,0,0},
        {2,250,158,50,0},
        {33,190,382,-40,0},
        {33,314,382,40,0},
        {0,46,226,0,0},
        {0,46,330,0,0},
        {0,126,126,0,0},
        {0,90,374,0,0},
        {0,254,346,0,0},
        {0,254,226,0,0},
        {0,254,286,0,0},
        {0,86,174,0,0},
        {0,298,166,0,0},
        {0,130,422,0,0},
        {-1}
	},//3
	{
        {28,298,162,0,0},
        {27,170,162,0,0},
        {33,146,226,90,0},
        {33,146,306,90,0},
        {33,146,382,90,0},
        {29,14,298,0,0},
        {34,154,178,-40,0},
        {34,314,178,40,0},
        {34,154,430,40,0},
        {34,310,430,-30,0},
        {8,198,326,0,0},
        {8,282,326,0,0},
        {34,242,302,90,0},
        {35,242,270,130,0},
        {35,218,430,30,0},
        {35,258,430,40,0},
        {0,50,238,0,0},
        {0,94,174,0,0},
        {0,198,298,0,0},
        {0,282,298,0,0},
        {0,50,370,0,0},
        {0,102,434,0,0},
        {-1}
	},//4
	{
        {33,86,510,-20,0},
        {33,186,250,90,0},
        {35,302,326,0,0},
        {33,226,298,10,0},
        {33,122,458,-90,0},
        {33,186,378,90,0},
        {33,122,378,-90,0},
        {29,154,410,0,0},
        {35,30,546,260,0},
        {34,274,306,10,0},
        {33,122,170,-90,0},
        {35,22,186,-90,0},
        {27,50,138,0,0},
        {0,42,558,0,0},
        {0,86,542,0,0},
        {0,122,530,0,0},
        {0,286,342,0,0},
        {0,246,330,0,0},
        {0,206,322,0,0},
        {0,82,462,0,0},
        {0,26,462,0,0},
        {0,26,374,0,0},
        {0,82,374,0,0},
        {0,34,210,0,0},
        {-1}
	},//5
	{
        {12,242,530,370,0},
        {12,82,350,10,0},
        {12,58,258,-20,0},
        {12,262,130,0,0},
        {29,158,222,0,0},
        {28,302,198,90,0},
        {12,58,138,-20,0},
        {27,126,442,-160,0},
        {28,14,442,160,0},
        {0,266,162,0,0},
        {0,214,162,0,0},
        {0,34,298,0,0},
        {0,86,278,0,0},
        {0,154,498,0,0},
        {0,158,402,0,0},
        {0,158,306,0,0},
        {0,74,374,0,0},
        {0,62,174,0,0},
        {0,206,546,0,0},
        {0,270,558,0,0},
        {-1}
	},//6
	{
        {28,306,474,-20,0},
        {10,294,578,85,0},
        {11,222,490,-30,0},
        {29,162,366,0,0},
        {12,86,514,20,0},
        {28,38,326,310,0},
        {33,58,457,90,0},
        {33,58,425,90,0},
        {28,42,174,-50,0},
        {33,58,278,90,0},
        {35,82,162,-50,0},
        {35,222,130,-90,0},
        {28,302,114,0,0},
        {0,18,382,0,0},
        {0,98,550,0,0},
        {0,18,454,0,0},
        {0,82,186,0,0},
        {0,234,530,0,0},
        {0,162,286,0,0},
        {0,46,530,0,0},
        {0,22,286,0,0},
        {0,162,434,0,0},
        {0,282,566,0,0},
        {0,278,178,0,0},
        {-1}
	},//7
	{
        {29,26,330,0,0},
        {12,2,506,-90,0},
        {12,2,414,-90,0},
        {12,2,302,-90,0},
        {10,38,210,275,0},
        {28,274,150,0,0},
        {35,194,170,270,0},
        {35,306,174,0,0},
        {33,178,370,270,0},
        {33,178,274,270,0},
        {35,194,538,180,0},
        {33,178,466,270,0},
        {35,310,538,80,0},
        {34,234,558,180,0},
        {34,270,558,180,0},
        {34,170,186,0,0},
        {34,170,234,-180,0},
        {0,26,412,0,0},
        {0,26,560,0,0},
        {0,46,224,0,0},
        {0,26,252,0,0},
        {0,294,370,0,0},
        {0,294,442,0,0},
        {0,218,442,0,0},
        {0,26,484,0,0},
        {0,218,510,0,0},
        {0,290,510,0,0},
        {0,218,370,0,0},
        {0,218,294,0,0},
        {0,294,294,0,0},
        {0,178,212,0,0},
        {-1}
	},//8
	{
        {28,138,170,-20,0},
        {27,38,242,-50,0},
        {33,186,210,50,0},
        {35,250,306,40,0},
        {33,226,258,50,0},
        {33,218,358,140,0},
        {33,98,458,140,0},
        {35,206,398,50,0},
        {35,46,418,140,0},
        {35,18,390,-140,0},
        {33,10,454,-130,0},
        {8,14,270,0,0},
        {0,302,298,0,0},
        {0,74,306,0,0},
        {0,106,353,0,0},
        {0,192,287,0,0},
        {0,78,290,0,0},
        {0,86,274,0,0},
        {0,98,262,0,0},
        {0,114,250,0,0},
        {0,130,242,0,0},
        {0,150,242,0,0},
        {0,46,390,0,0},
        {-1}
	},//9
	{
        {35,242,350,510,0},
        {35,234,458,90,0},
        {33,230,258,60,0},
        {33,254,190,60,0},
        {35,306,314,60,0},
        {33,290,254,60,0},
        {35,190,458,-180,0},
        {34,283,347,150,0},
        {28,134,162,0,0},
        {27,14,162,0,0},
        {33,177,205,30,0},
        {35,146,458,90,0},
        {35,102,458,-180,0},
        {35,62,458,90,0},
        {35,18,458,180,0},
        {33,250,402,90,0},
        {0,114,202,0,0},
        {0,122,422,0,0},
        {0,26,282,0,0},
        {0,114,282,0,0},
        {0,26,204,0,0},
        {0,210,418,0,0},
        {0,266,266,0,0},
        {0,230,202,0,0},
        {0,266,322,0,0},
        {0,42,422,0,0},
        {-1}
	},//10
	{
        {8,2,434,0,0},
        {8,318,434,0,0},
        {10,294,698,85,0},
        {10,22,698,-185,0},
        {8,154,670,0,0},
        {27,18,414,-40,0},
        {27,190,414,-40,0},
        {28,138,413,40,0},
        {28,306,414,40,0},
        {8,78,353,0,0},
        {8,250,349,0,0},
        {0,118,543,0,0},
        {0,118,607,0,0},
        {0,194,607,0,0},
        {0,194,539,0,0},
        {0,262,539,0,0},
        {0,50,543,0,0},
        {0,50,474,0,0},
        {0,118,474,0,0},
        {0,190,474,0,0},
        {0,262,471,0,0},
        {-1}
	},//11
	{
        {16,307,463,60,0},
        {16,269,477,80,0},
        {16,50,478,100,0},
        {16,12,464,120,0},
        {16,229,485,80,0},
        {16,90,486,100,0},
        {12,318,386,90,0},
        {12,2,390,-90,0},
        {12,2,282,-90,0},
        {12,318,278,90,0},
        {33,294,374,20,0},
        {33,230,330,-20,0},
        {33,242,426,-20,0},
        {33,309,291,30,0},
        {29,162,394,0,0},
        {33,242,258,20,0},
        {28,65,145,0,0},
        {35,114,174,-10,0},
        {34,87,155,30,0},
        {34,130,390,90,0},
        {34,130,318,90,0},
        {34,130,246,90,0},
        {0,238,282,0,0},
        {0,234,358,0,0},
        {0,282,394,0,0},
        {0,66,186,0,0},
        {0,38,262,0,0},
        {0,38,334,0,0},
        {0,38,402,0,0},
        {0,94,402,0,0},
        {0,94,334,0,0},
        {0,94,262,0,0},
        {-1}
	},//12
	{
        {10,22,462,170,0},
        {27,242,154,0,0},
        {28,70,154,0,0},
        {15,322,182,50,0},
        {33,86,210,90,0},
        {33,106,286,60,0},
        {29,154,342,0,0},
        {33,226,210,-90,0},
        {33,206,286,-60,0},
        {15,-3,187,-50,0},
        {0,274,222,0,0},
        {0,210,350,0,0},
        {0,294,426,0,0},
        {0,14,350,0,0},
        {0,210,418,0,0},
        {0,14,418,0,0},
        {0,154,246,0,0},
        {0,98,418,0,0},
        {0,46,294,0,0},
        {0,46,226,0,0},
        {0,294,354,0,0},
        {0,274,298,0,0},
        {0,98,350,0,0},
        {0,154,386,0,0},
        {-1}
	},//13
	{
        {10,30,578,170,0},
        {2,202,350,0,0},
        {2,202,290,0,0},
        {2,234,349,0,0},
        {2,234,289,0,0},
        {2,234,233,0,0},
        {2,202,233,0,0},
        {2,118,234,0,0},
        {2,118,290,0,0},
        {2,118,350,0,0},
        {2,86,349,0,0},
        {2,86,289,0,0},
        {2,86,233,0,0},
        {8,102,201,0,0},
        {8,222,197,0,0},
        {10,286,582,90,0},
        {8,218,505,0,0},
        {8,102,505,0,0},
        {27,14,173,0,0},
        {29,162,346,0,0},
        {12,319,371,90,0},
        {12,318,257,90,0},
        {28,306,173,0,0},
        {12,2,372,-90,0},
        {12,2,254,-90,0},
        {12,2,488,-90,0},
        {2,86,405,0,0},
        {2,118,408,0,0},
        {2,86,461,0,0},
        {2,118,464,0,0},
        {2,202,406,0,0},
        {2,202,466,0,0},
        {2,234,465,0,0},
        {2,234,405,0,0},
        {12,318,486,90,0},
        {0,162,410,0,0},
        {0,162,234,0,0},
        {0,70,353,0,0},
        {0,22,298,0,0},
        {0,70,229,0,0},
        {0,250,345,0,0},
        {0,298,285,0,0},
        {0,250,229,0,0},
        {0,298,401,0,0},
        {0,250,461,0,0},
        {0,162,466,0,0},
        {0,162,290,0,0},
        {0,22,406,0,0},
        {0,70,461,0,0},
        {-1}
	},//14
	{
        {27,90,170,-20,0},
        {8,226,422,0,0},
        {28,230,170,20,0},
        {8,162,518,0,0},
        {8,102,430,0,0},
        {10,22,574,175,0},
        {10,294,578,85,0},
        {12,26,198,-20,0},
        {11,270,170,0,0},
        {0,266,335,0,0},
        {0,270,219,0,0},
        {0,210,278,0,0},
        {0,58,331,0,0},
        {0,38,566,0,0},
        {0,50,218,0,0},
        {0,290,566,0,0},
        {0,226,366,0,0},
        {0,98,370,0,0},
        {0,202,474,0,0},
        {0,126,474,0,0},
        {0,114,278,0,0},
        {-1}
	}//15
};

int chapter1height[] = {
	0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 0, 0, 1, 1
};

int chapter1time[] = {
	5, 5, 10, 15, 15, 15, 20, 15, 10, 15, 15, 25, 20, 20, 35
};

#pragma mark chapter2
int chapter2data[][128][5] = {
	{
        {10,322,482,75,0},
        {4,158,206,0,0},
        {33,186,354,270,0},
        {33,122,390,90,0},
        {33,122,282,90,0},
        {33,186,318,270,0},
        {33,154,450,390,0},
        {35,302,378,180,0},
        {35,210,378,90,0},
        {35,102,258,270,0},
        {35,202,262,270,0},
        {33,226,314,90,0},
        {33,286,318,-90,0},
        {33,226,286,90,0},
        {33,286,234,-90,0},
        {33,254,162,220,0},
        {33,54,174,-40,0},
        {4,66,202,0,0},
        {33,86,322,-90,0},
        {33,26,238,90,0},
        {33,122,334,90,0},
        {33,26,318,90,0},
        {35,14,382,80,0},
        {35,98,382,190,0},
        {2,254,170,130,0},
        {35,266,458,90,0},
        {34,202,474,0,0},
        {34,218,474,0,0},
        {34,234,474,0,0},
        {0,154,342,0,0},
        {0,154,402,0,0},
        {0,154,278,0,0},
        {0,258,278,0,0},
        {0,258,218,0,0},
        {0,258,346,0,0},
        {0,58,266,0,0},
        {0,58,322,0,0},
        {0,58,378,0,0},
        {0,58,434,0,0},
        {0,258,410,0,0},
        {-1}
	},//1
	{
        {12,190,326,140,0},
        {12,46,498,220,0},
        {12,122,194,-160,0},
        {4,158,174,0,0},
        {10,278,514,120,0},
        {12,66,294,-40,0},
        {12,158,435,40,0},
        {12,122,562,220,0},
        {12,210,479,40,0},
        {33,106,474,40,0},
        {33,142,505,40,0},
        {4,38,358,0,0},
        {33,198,553,40,0},
        {12,130,242,-40,0},
        {33,246,390,20,0},
        {33,174,370,10,0},
        {4,86,374,0,0},
        {11,230,542,-230,0},
        {34,118,402,0,0},
        {35,118,346,180,0},
        {35,266,666,150,0},
        {33,238,618,80,0},
        {4,298,158,0,0},
        {12,290,122,0,0},
        {0,198,514,0,0},
        {0,162,398,0,0},
        {0,138,466,0,0},
        {0,198,286,0,0},
        {0,138,338,0,0},
        {0,230,710,0,0},
        {0,270,506,0,0},
        {0,302,470,0,0},
        {0,302,402,0,0},
        {0,302,310,0,0},
        {0,38,456,0,0},
        {0,98,500,0,0},
        {0,154,548,0,0},
        {0,198,588,0,0},
        {0,218,410,0,0},
        {0,138,266,0,0},
        {0,174,234,0,0},
        {0,214,650,0,0},
        {-1}
	},//2
	{
        {10,298,226,-10,0},
        {12,82,350,10,0},
        {4,92,260,0,0},
        {12,10,286,-20,0},
        {2,78,334,-70,0},
        {15,206,230,0,0},
        {12,262,130,0,0},
        {27,206,194,-90,0},
        {29,162,423,0,0},
        {33,190,426,-90,0},
        {33,226,342,90,0},
        {33,190,342,-90,0},
        {33,226,426,90,0},
        {33,262,546,20,0},
        {33,226,494,90,0},
        {33,190,510,-90,0},
        {35,206,278,-90,0},
        {35,250,278,0,0},
        {33,266,334,90,0},
        {4,246,314,0,0},
        {33,266,418,90,0},
        {33,266,458,90,0},
        {33,46,490,90,0},
        {35,22,430,270,0},
        {35,62,422,-20,0},
        {33,6,494,-90,0},
        {33,82,546,20,0},
        {33,134,406,90,0},
        {0,282,162,0,0},
        {0,254,162,0,0},
        {0,12,308,0,0},
        {0,50,299,0,0},
        {0,26,467,0,0},
        {0,26,511,0,0},
        {0,210,347,0,0},
        {0,90,379,0,0},
        {0,46,366,0,0},
        {0,210,411,0,0},
        {0,210,478,0,0},
        {0,246,346,0,0},
        {0,246,410,0,0},
        {0,246,478,0,0},
        {0,298,482,0,0},
        {0,298,386,0,0},
        {0,298,290,0,0},
        {-1}
	},//3
	{
        {12,86,346,320,0},
        {4,26,202,0,0},
        {10,22,458,175,0},
        {12,166,286,30,0},
        {12,90,226,-40,0},
        {12,190,194,0,0},
        {4,282,206,0,0},
        {10,278,458,90,0},
        {11,234,394,0,0},
        {15,172,404,-10,0},
        {15,152,410,-10,0},
        {15,132,416,-10,0},
        {15,112,424,-10,0},
        {12,210,322,-40,0},
        {0,82,398,0,0},
        {0,118,362,0,0},
        {0,162,322,0,0},
        {0,126,294,0,0},
        {0,86,270,0,0},
        {0,130,234,0,0},
        {0,178,230,0,0},
        {0,222,230,0,0},
        {0,196,426,0,0},
        {0,196,392,0,0},
        {0,278,150,0,0},
        {0,210,350,0,0},
        {0,246,322,0,0},
        {-1}
	},//4
	{
        {28,138,354,90,0},
        {4,150,182,0,0},
        {15,78,258,10,0},
        {2,30,454,110,0},
        {2,74,470,110,0},
        {12,178,230,-20,0},
        {16,78,214,0,0},
        {15,78,182,0,0},
        {15,138,382,-10,0},
        {15,138,274,0,0},
        {27,218,370,-90,0},
        {15,214,290,0,0},
        {4,246,238,0,0},
        {15,274,186,0,0},
        {2,246,406,120,0},
        {2,286,430,120,0},
        {11,106,390,0,0},
        {33,274,238,90,0},
        {33,274,294,90,0},
        {0,298,322,0,0},
        {0,298,266,0,0},
        {0,298,202,0,0},
        {0,174,374,0,0},
        {0,174,334,0,0},
        {0,174,298,0,0},
        {0,66,438,0,0},
        {0,102,454,0,0},
        {0,30,334,0,0},
        {0,106,222,0,0},
        {0,106,254,0,0},
        {0,106,286,0,0},
        {-1}
	},//5
	{
        {4,38,218,0,0},
        {4,38,278,0,0},
        {4,38,338,0,0},
        {4,286,338,0,0},
        {4,286,278,0,0},
        {4,286,218,0,0},
        {4,38,402,0,0},
        {4,38,158,0,0},
        {4,98,158,0,0},
        {4,222,158,0,0},
        {4,286,158,0,0},
        {4,286,398,0,0},
        {2,254,154,0,0},
        {2,194,154,0,0},
        {2,126,154,0,0},
        {2,66,154,0,0},
        {29,158,282,0,0},
        {4,158,158,0,0},
        {16,307,463,60,0},
        {16,269,477,80,0},
        {16,50,478,100,0},
        {16,12,464,120,0},
        {16,229,485,80,0},
        {16,90,486,100,0},
        {0,38,278,0,0},
        {0,38,218,0,0},
        {0,38,338,0,0},
        {0,38,402,0,0},
        {0,98,158,0,0},
        {0,222,158,0,0},
        {0,286,278,0,0},
        {0,286,338,0,0},
        {0,286,398,0,0},
        {0,286,218,0,0},
        {-1}
	},//6
	{
        {4,42,202,0,0},
        {35,66,310,-90,0},
        {35,102,278,-90,0},
        {35,170,214,-80,0},
        {35,134,246,-90,0},
        {35,130,342,-90,0},
        {35,166,310,-90,0},
        {35,198,278,-90,0},
        {35,194,358,-90,0},
        {35,230,326,-90,0},
        {12,10,414,-150,0},
        {12,78,454,-150,0},
        {12,182,462,160,0},
        {12,270,430,160,0},
        {4,254,170,0,0},
        {35,206,186,-90,0},
        {35,238,154,-90,0},
        {35,274,126,-80,0},
        {4,286,142,0,0},
        {4,42,150,0,0},
        {35,14,202,220,0},
        {35,14,154,220,0},
        {0,122,294,0,0},
        {0,86,326,0,0},
        {0,178,322,0,0},
        {0,214,290,0,0},
        {0,150,262,0,0},
        {0,182,234,0,0},
        {0,146,358,0,0},
        {0,210,374,0,0},
        {0,242,342,0,0},
        {-1}
	},//7
	{
        {15,50,254,0,0},
        {16,50,286,0,0},
        {16,50,326,0,0},
        {16,50,366,0,0},
        {12,94,218,-20,0},
        {4,22,222,0,0},
        {4,22,170,0,0},
        {4,22,118,0,0},
        {10,22,462,170,0},
        {27,150,186,0,0},
        {28,286,186,0,0},
        {15,310,190,10,0},
        {2,250,402,70,0},
        {8,146,358,0,0},
        {8,246,358,0,0},
        {8,50,402,0,0},
        {2,146,402,110,0},
        {0,134,274,0,0},
        {0,194,298,0,0},
        {0,154,262,0,0},
        {0,262,274,0,0},
        {0,246,262,0,0},
        {0,202,250,0,0},
        {0,178,254,0,0},
        {0,194,318,0,0},
        {0,226,254,0,0},
        {0,18,294,0,0},
        {0,18,358,0,0},
        {0,18,426,0,0},
        {-1}
	},//8
	{
        {16,126,282,0,0},
        {16,126,242,0,0},
        {15,198,254,-10,0},
        {4,154,202,0,0},
        {16,262,306,0,0},
        {16,262,266,0,0},
        {2,26,458,310,0},
        {10,294,458,85,0},
        {15,214,466,0,0},
        {16,190,190,0,0},
        {16,190,230,0,0},
        {4,294,138,0,0},
        {16,238,154,80,0},
        {15,210,158,-10,0},
        {33,158,310,10,0},
        {33,230,323,10,0},
        {28,77,171,0,0},
        {35,105,199,0,0},
        {33,178,366,10,0},
        {33,154,362,10,0},
        {33,218,410,90,0},
        {0,242,354,0,0},
        {0,182,342,0,0},
        {0,126,330,0,0},
        {0,226,290,0,0},
        {0,294,246,0,0},
        {0,294,322,0,0},
        {0,294,390,0,0},
        {0,154,278,0,0},
        {0,178,398,0,0},
        {0,18,130,0,0},
        {0,90,214,0,0},
        {0,122,386,0,0},
        {0,138,446,0,0},
        {-1}
	},//9
	{
        {15,54,166,0,0},
        {16,54,198,0,0},
        {16,274,370,0,0},
        {10,18,450,180,0},
        {10,294,458,85,0},
        {12,214,182,-10,0},
        {15,274,226,0,0},
        {15,214,246,10,0},
        {16,274,258,0,0},
        {15,234,250,10,0},
        {4,302,166,0,0},
        {15,254,254,10,0},
        {4,22,138,0,0},
        {27,270,294,40,0},
        {28,190,246,-10,0},
        {16,54,274,0,0},
        {16,54,350,0,0},
        {8,54,390,0,0},
        {8,54,314,0,0},
        {8,54,234,0,0},
        {8,54,422,0,0},
        {8,274,414,0,0},
        {11,134,214,-60,0},
        {11,98,246,-30,0},
        {15,126,238,-50,0},
        {15,74,266,-20,0},
        {0,302,218,0,0},
        {0,302,270,0,0},
        {0,302,378,0,0},
        {0,98,390,0,0},
        {0,238,390,0,0},
        {0,166,450,0,0},
        {0,198,210,0,0},
        {0,246,202,0,0},
        {0,130,306,0,0},
        {0,206,306,0,0},
        {-1}
	},//10
	{
        {6,46,382,0,0},
        {6,46,478,0,0},
        {16,78,324,0,0},
        {16,78,284,0,0},
        {16,78,244,0,0},
        {16,14,324,0,0},
        {16,14,284,0,0},
        {16,14,244,0,0},
        {15,78,212,0,0},
        {15,14,212,0,0},
        {4,46,192,0,0},
        {16,14,364,0,0},
        {2,50,586,-60,0},
        {16,78,364,0,0},
        {16,14,404,0,0},
        {16,310,486,0,0},
        {16,250,486,0,0},
        {16,250,446,0,0},
        {16,310,446,0,0},
        {16,310,406,0,0},
        {16,250,406,0,0},
        {16,310,367,0,0},
        {16,250,326,0,0},
        {16,250,366,0,0},
        {15,250,214,0,0},
        {15,310,218,0,0},
        {6,278,426,0,0},
        {6,278,346,0,0},
        {6,278,266,0,0},
        {16,310,523,0,0},
        {16,14,444,0,0},
        {16,14,484,0,0},
        {16,14,524,0,0},
        {16,78,404,0,0},
        {16,78,444,0,0},
        {28,226,250,40,0},
        {16,250,286,0,0},
        {16,250,246,0,0},
        {16,310,327,0,0},
        {16,310,287,0,0},
        {16,310,247,0,0},
        {16,78,484,0,0},
        {4,282,198,0,0},
        {27,102,250,-40,0},
        {10,162,566,180,0},
        {33,106,504,-10,0},
        {6,46,286,0,0},
        {16,14,564,0,0},
        {8,162,182,0,0},
        {12,270,570,150,0},
        {11,203,609,170,0},
        {0,46,426,0,0},
        {0,46,510,0,0},
        {0,278,386,0,0},
        {0,278,306,0,0},
        {0,202,423,0,0},
        {0,186,550,0,0},
        {0,46,334,0,0},
        {0,130,423,0,0},
        {0,278,466,0,0},
        {0,258,550,0,0},
        {0,130,351,0,0},
        {0,202,351,0,0},
        {-1}
	},//11
	{
        {10,222,430,70,0},
        {12,234,346,-280,0},
        {6,70,386,0,0},
        {6,70,342,0,0},
        {6,70,302,0,0},
        {6,70,262,0,0},
        {27,14,226,-80,0},
        {12,82,170,10,0},
        {15,234,138,0,0},
        {28,302,134,0,0},
        {6,306,234,-60,0},
        {6,70,214,-90,0},
        {6,114,218,-90,0},
        {15,114,278,0,0},
        {8,114,414,0,0},
        {15,314,158,20,0},
        {15,126,274,-30,0},
        {8,22,250,0,0},
        {33,22,426,-90,0},
        {33,22,322,-90,0},
        {33,110,346,90,0},
        {33,181,341,80,0},
        {35,177,393,70,0},
        {6,234,178,90,0},
        {10,298,566,85,0},
        {12,94,514,-20,0},
        {12,190,478,-20,0},
        {11,14,530,-30,0},
        {11,249,611,160,0},
        {0,201,301,0,0},
        {0,211,343,0,0},
        {0,219,385,0,0},
        {0,66,410,0,0},
        {0,66,362,0,0},
        {0,66,322,0,0},
        {0,274,223,0,0},
        {0,278,324,0,0},
        {0,42,198,0,0},
        {0,90,206,0,0},
        {0,282,423,0,0},
        {0,66,554,0,0},
        {0,142,526,0,0},
        {0,218,498,0,0},
        {0,286,539,0,0},
        {-1}
	},//12
	{
        {6,90,302,0,0},
        {28,66,174,30,0},
        {15,2,190,-20,0},
        {6,30,270,0,0},
        {15,214,194,30,0},
        {6,30,214,0,0},
        {6,190,366,0,0},
        {28,202,170,30,0},
        {12,142,478,340,0},
        {4,246,182,0,0},
        {4,302,162,0,0},
        {6,142,334,0,0},
        {10,294,698,90,0},
        {33,218,250,-90,0},
        {33,218,330,-90,0},
        {33,274,206,-90,0},
        {33,274,286,-90,0},
        {33,250,390,-150,0},
        {11,202,443,-30,0},
        {28,134,170,30,0},
        {33,286,450,-90,0},
        {33,286,534,-90,0},
        {33,286,614,-90,0},
        {33,250,638,20,0},
        {6,174,610,0,0},
        {6,106,586,0,0},
        {6,42,566,0,0},
        {28,162,518,10,0},
        {27,14,538,-10,0},
        {10,106,458,75,0},
        {12,230,542,20,0},
        {15,78,498,-20,0},
        {10,230,586,50,0},
        {10,22,698,170,0},
        {15,90,506,-20,0},
        {15,78,510,-20,0},
        {0,90,318,0,0},
        {0,30,238,0,0},
        {0,34,294,0,0},
        {0,194,390,0,0},
        {0,142,358,0,0},
        {0,78,446,0,0},
        {0,30,446,0,0},
        {0,38,642,0,0},
        {0,106,666,0,0},
        {0,106,614,0,0},
        {0,38,590,0,0},
        {0,174,682,0,0},
        {0,174,634,0,0},
        {0,246,666,0,0},
        {-1}
	},//13
	{
        {12,310,374,20,0},
        {28,222,322,20,0},
        {12,290,278,20,0},
        {15,170,238,0,0},
        {16,170,270,0,0},
        {12,222,202,-10,0},
        {15,102,210,0,0},
        {12,210,426,10,0},
        {8,38,430,0,0},
        {6,110,462,40,0},
        {4,298,166,0,0},
        {12,294,246,160,0},
        {2,162,386,0,0},
        {33,102,298,90,0},
        {33,102,262,90,0},
        {34,217,402,90,0},
        {2,138,354,110,0},
        {10,298,462,85,0},
        {0,114,418,0,0},
        {0,10,282,0,0},
        {0,286,390,0,0},
        {0,186,354,0,0},
        {0,210,282,0,0},
        {0,210,254,0,0},
        {0,298,214,0,0},
        {0,138,314,0,0},
        {0,138,258,0,0},
        {0,138,198,0,0},
        {0,186,390,0,0},
        {-1}
	},//14
	{
        {15,218,354,220,0},
        {6,134,274,20,0},
        {15,70,250,0,0},
        {16,70,282,0,0},
        {16,70,322,0,0},
        {16,70,362,0,0},
        {12,170,418,90,0},
        {6,122,338,0,0},
        {6,122,410,0,0},
        {4,26,198,0,0},
        {27,10,546,-90,0},
        {15,6,574,180,0},
        {12,226,418,-90,0},
        {28,266,178,30,0},
        {8,182,490,0,0},
        {6,198,550,90,0},
        {6,278,414,0,0},
        {6,278,338,0,0},
        {12,321,313,90,0},
        {6,266,274,-20,0},
        {10,303,223,10,0},
        {10,102,210,-95,0},
        {4,26,150,0,0},
        {15,178,354,140,0},
        {15,206,350,180,0},
        {15,190,350,180,0},
        {8,70,480,0,0},
        {8,218,490,0,0},
        {27,146,178,-30,0},
        {12,321,399,90,0},
        {10,294,578,85,0},
        {12,70,590,200,0},
        {6,202,238,90,0},
        {4,26,102,0,0},
        {16,70,442,0,0},
        {16,70,402,0,0},
        {12,322,482,90,0},
        {0,26,298,0,0},
        {0,26,370,0,0},
        {0,26,442,0,0},
        {0,122,454,0,0},
        {0,122,366,0,0},
        {0,126,302,0,0},
        {0,150,242,0,0},
        {0,242,242,0,0},
        {0,278,454,0,0},
        {0,274,302,0,0},
        {0,278,366,0,0},
        {0,270,550,0,0},
        {-1}
	}//15
};


int chapter2height[] = {
	0, 2, 1, 0, 0,
    0, 0, 0, 0, 0,
    1, 1, 2, 0, 1
};

int chapter2time[] = {
	15, 30, 35, 20, 20, 
	25, 20, 10, 25, 20, 
	20, 20, 35, 20, 40
};


#pragma mark chapter3
int chapter3data[][128][5] = {
	{
        {33,146,262,90,0},
        {33,202,330,450,0},
        {33,202,406,90,0},
        {33,146,342,90,0},
        {33,266,398,90,0},
        {33,314,266,90,0},
        {33,14,314,270,0},
        {33,74,274,-90,0},
        {33,14,394,-90,0},
        {33,74,350,-90,0},
        {33,266,318,90,0},
        {33,314,346,90,0},
        {35,38,458,170,0},
        {35,90,402,-180,0},
        {33,14,234,-90,0},
        {35,130,402,90,0},
        {35,186,454,90,0},
        {33,102,470,180,0},
        {34,154,470,180,0},
        {35,162,206,270,0},
        {35,298,206,0,0},
        {35,250,258,0,0},
        {35,218,258,-90,0},
        {33,214,190,0,0},
        {34,266,190,0,0},
        {34,202,286,90,0},
        {33,314,402,90,0},
        {35,291,461,130,0},
        {34,266,446,90,0},
        {34,315,447,90,0},
        {14,46,214,-90,0},
        {14,42,334,-80,0},
        {14,54,442,0,0},
        {14,178,222,0,0},
        {14,274,222,-50,0},
        {14,290,294,-90,0},
        {0,174,390,0,0},
        {0,174,330,0,0},
        {0,174,270,0,0},
        {0,290,430,0,0},
        {0,290,366,0,0},
        {0,230,218,0,0},
        {0,290,270,0,0},
        {-1}
	},//1
	{
        {16,262,213,0,0},
        {16,262,298,0,0},
        {16,262,338,0,0},
        {14,298,250,-80,0},
        {14,298,378,-100,0},
        {12,194,340,10,0},
        {12,110,281,-20,0},
        {12,202,249,-20,0},
        {12,198,308,160,0},
        {2,298,702,60,0},
        {14,298,442,260,0},
        {12,214,530,10,0},
        {12,114,512,10,0},
        {14,298,506,-90,0},
        {27,270,418,-90,0},
        {27,270,606,-90,0},
        {16,262,638,0,0},
        {12,26,312,-20,0},
        {12,202,638,10,0},
        {12,114,622,10,0},
        {14,298,574,-100,0},
        {14,298,186,-90,0},
        {12,214,438,10,0},
        {12,122,421,10,0},
        {27,270,514,-90,0},
        {14,298,314,-100,0},
        {14,298,638,-90,0},
        {0,226,397,0,0},
        {0,210,497,0,0},
        {0,158,365,0,0},
        {0,138,296,0,0},
        {0,186,280,0,0},
        {0,234,260,0,0},
        {0,210,593,0,0},
        {0,30,483,0,0},
        {0,30,350,0,0},
        {0,86,312,0,0},
        {0,30,415,0,0},
        {0,110,458,0,0},
        {0,110,546,0,0},
        {0,202,674,0,0},
        {0,106,658,0,0},
        {0,30,570,0,0},
        {-1}
	},//2
	{
        {12,266,210,10,0},
        {14,22,198,-80,0},
        {35,66,530,170,0},
        {35,262,378,90,0},
        {35,266,278,0,0},
        {34,282,314,90,0},
        {34,202,394,180,0},
        {28,66,230,-170,0},
        {28,186,254,-170,0},
        {34,134,246,10,0},
        {34,158,250,10,0},
        {35,166,378,-180,0},
        {34,226,394,180,0},
        {34,282,342,90,0},
        {34,150,342,-90,0},
        {34,150,314,-90,0},
        {33,62,594,180,0},
        {33,50,474,90,0},
        {33,50,394,90,0},
        {14,22,270,-90,0},
        {14,22,342,-80,0},
        {14,22,418,-80,0},
        {14,22,490,-90,0},
        {14,26,566,0,0},
        {14,278,238,180,0},
        {35,6,574,-170,0},
        {33,50,334,90,0},
        {27,234,542,-180,0},
        {33,130,542,0,0},
        {35,270,530,90,0},
        {33,242,502,10,0},
        {33,154,486,10,0},
        {33,170,410,-20,0},
        {28,74,450,-200,0},
        {0,306,273,0,0},
        {0,210,326,0,0},
        {0,142,274,0,0},
        {0,306,313,0,0},
        {0,150,218,0,0},
        {0,130,506,0,0},
        {0,158,446,0,0},
        {0,206,430,0,0},
        {0,166,514,0,0},
        {0,306,538,0,0},
        {0,306,498,0,0},
        {0,306,458,0,0},
        {0,118,374,0,0},
        {0,118,326,0,0},
        {-1}
	},//3
	{
        {33,274,254,0,0},
        {33,218,254,360,0},
        {14,282,154,-80,0},
        {14,274,222,-170,0},
        {35,298,238,90,0},
        {33,314,178,90,0},
        {14,202,222,180,0},
        {35,230,178,90,0},
        {35,298,122,0,0},
        {34,46,194,180,0},
        {33,214,278,30,0},
        {33,282,318,30,0},
        {33,170,194,180,0},
        {33,314,294,-90,0},
        {35,250,374,0,0},
        {35,74,270,270,0},
        {6,58,326,90,0},
        {6,58,378,90,0},
        {35,74,526,-180,0},
        {35,250,526,90,0},
        {6,118,542,0,0},
        {6,162,542,0,0},
        {6,206,542,0,0},
        {14,34,566,0,0},
        {14,130,566,0,0},
        {14,214,566,0,0},
        {33,90,194,180,0},
        {35,22,210,270,0},
        {14,34,230,-90,0},
        {14,30,302,-80,0},
        {14,30,378,-90,0},
        {28,158,246,0,0},
        {6,206,358,0,0},
        {6,162,358,0,0},
        {35,298,582,90,0},
        {35,18,582,-180,0},
        {6,118,358,0,0},
        {6,58,482,90,0},
        {6,58,430,90,0},
        {6,266,478,90,0},
        {6,266,426,90,0},
        {14,30,474,-80,0},
        {0,226,414,0,0},
        {0,170,414,0,0},
        {0,110,414,0,0},
        {0,30,270,0,0},
        {0,30,346,0,0},
        {0,30,426,0,0},
        {0,90,570,0,0},
        {0,178,570,0,0},
        {0,270,570,0,0},
        {0,230,322,0,0},
        {0,190,298,0,0},
        {0,110,482,0,0},
        {0,170,482,0,0},
        {0,226,482,0,0},
        {-1}
	},//4
	{
        {10,22,574,535,0},
        {10,294,578,90,0},
        {28,265,128,0,0},
        {27,68,128,0,0},
        {35,306,178,0,0},
        {29,166,302,0,0},
        {33,74,394,90,0},
        {33,138,378,90,0},
        {33,138,254,90,0},
        {33,194,378,-90,0},
        {33,254,394,-90,0},
        {33,194,254,-90,0},
        {14,166,178,-90,0},
        {14,166,254,-90,0},
        {14,166,406,-90,0},
        {35,22,182,-90,0},
        {34,254,290,-90,0},
        {34,254,326,-90,0},
        {34,74,326,90,0},
        {34,74,290,90,0},
        {14,166,330,-90,0},
        {33,74,494,90,0},
        {33,138,478,90,0},
        {33,194,478,-90,0},
        {33,254,494,-90,0},
        {14,166,494,-90,0},
        {0,106,306,0,0},
        {0,30,310,0,0},
        {0,222,306,0,0},
        {0,290,306,0,0},
        {0,30,386,0,0},
        {0,106,386,0,0},
        {0,222,386,0,0},
        {0,290,386,0,0},
        {0,30,466,0,0},
        {0,106,466,0,0},
        {0,222,466,0,0},
        {0,290,470,0,0},
        {-1}
	},//5
	{
        {16,46,258,0,0},
        {16,198,330,-180,0},
        {16,94,298,0,0},
        {16,46,218,0,0},
        {16,198,298,-180,0},
        {16,254,218,-180,0},
        {16,94,338,0,0},
        {16,254,258,-180,0},
        {14,124,330,-10,0},
        {12,150,370,-20,0},
        {2,294,454,50,0},
        {27,74,210,0,0},
        {27,170,210,0,0},
        {14,290,182,-90,0},
        {14,290,250,-90,0},
        {14,286,314,-90,0},
        {14,286,378,-90,0},
        {28,86,374,0,0},
        {2,26,458,-50,0},
        {6,194,434,0,0},
        {14,238,430,220,0},
        {8,46,290,0,0},
        {6,290,354,0,0},
        {6,290,286,0,0},
        {35,18,322,-90,0},
        {33,146,234,-90,0},
        {12,206,350,-20,0},
        {12,202,190,0,0},
        {12,98,190,0,0},
        {14,226,310,0,0},
        {0,114,414,0,0},
        {0,42,430,0,0},
        {0,78,242,0,0},
        {0,114,242,0,0},
        {0,182,246,0,0},
        {0,194,458,0,0},
        {0,274,438,0,0},
        {0,238,398,0,0},
        {0,222,246,0,0},
        {0,162,394,0,0},
        {0,254,306,0,0},
        {-1}
	},//6
	{
        {33,82,250,30,0},
        {33,82,410,30,0},
        {33,146,322,-30,0},
        {33,74,126,0,0},
        {35,14,146,-90,0},
        {4,130,154,0,0},
        {33,158,430,0,0},
        {33,234,410,-30,0},
        {33,270,350,-90,0},
        {33,270,270,-90,0},
        {33,238,202,-140,0},
        {14,302,422,270,0},
        {4,254,174,0,0},
        {14,126,462,10,0},
        {6,298,338,0,0},
        {6,298,278,0,0},
        {34,138,182,-40,0},
        {35,18,590,-190,0},
        {33,270,498,270,0},
        {33,238,466,-30,0},
        {33,162,486,0,0},
        {33,86,506,-30,0},
        {28,54,466,-30,0},
        {14,290,574,-170,0},
        {33,234,546,0,0},
        {33,174,546,0,0},
        {33,90,538,10,0},
        {14,166,574,180,0},
        {14,298,502,-90,0},
        {0,86,386,0,0},
        {0,90,230,0,0},
        {0,22,162,0,0},
        {0,134,302,0,0},
        {0,18,238,0,0},
        {0,186,458,0,0},
        {0,242,434,0,0},
        {0,158,342,0,0},
        {0,226,238,0,0},
        {0,198,214,0,0},
        {0,158,162,0,0},
        {0,298,306,0,0},
        {0,298,366,0,0},
        {0,298,250,0,0},
        {-1}
	},//7
	{
        {33,142,398,20,0},
        {33,66,338,-30,0},
        {33,174,330,-20,0},
        {4,126,302,0,0},
        {33,130,266,-20,0},
        {4,294,174,0,0},
        {14,298,458,190,0},
        {35,258,274,0,0},
        {4,22,166,0,0},
        {10,26,458,170,0},
        {33,98,166,0,0},
        {12,138,170,10,0},
        {0,166,358,0,0},
        {0,202,346,0,0},
        {0,246,290,0,0},
        {0,222,214,0,0},
        {0,154,434,0,0},
        {0,114,414,0,0},
        {0,58,374,0,0},
        {0,94,350,0,0},
        {0,162,282,0,0},
        {0,22,226,0,0},
        {0,22,282,0,0},
        {0,22,338,0,0},
        {0,150,202,0,0},
        {0,94,198,0,0},
        {-1}
	},//8
	{
        {10,290,338,90,0},
        {12,290,382,20,0},
        {28,226,354,0,0},
        {27,98,354,0,0},
        {4,102,250,0,0},
        {12,294,254,60,0},
        {35,66,382,-90,0},
        {33,230,302,20,0},
        {34,50,406,-90,0},
        {34,50,422,-90,0},
        {4,234,522,0,0},
        {4,98,518,0,0},
        {35,30,534,0,0},
        {35,302,526,-90,0},
        {35,134,694,170,0},
        {35,238,642,100,0},
        {4,146,250,0,0},
        {35,90,642,170,0},
        {4,146,298,0,0},
        {33,14,318,-40,0},
        {33,58,586,70,0},
        {33,270,586,-70,0},
        {35,194,694,100,0},
        {34,218,666,-260,0},
        {34,112,668,-100,0},
        {35,58,274,80,0},
        {35,186,274,190,0},
        {35,158,234,0,0},
        {35,86,234,-90,0},
        {0,250,402,0,0},
        {0,250,470,0,0},
        {0,56,345,0,0},
        {0,22,375,0,0},
        {0,22,426,0,0},
        {0,174,402,0,0},
        {0,174,470,0,0},
        {0,94,470,0,0},
        {0,94,402,0,0},
        {0,22,484,0,0},
        {0,254,242,0,0},
        {0,286,290,0,0},
        {0,102,626,0,0},
        {0,210,570,0,0},
        {0,162,686,0,0},
        {0,134,570,0,0},
        {0,234,630,0,0},
        {-1}
	},//9
	{
        {16,254,270,0,0},
        {28,306,222,90,0},
        {8,310,248,0,0},
        {33,146,322,-20,0},
        {12,162,206,-20,0},
        {12,262,170,-20,0},
        {35,234,698,170,0},
        {4,142,386,0,0},
        {14,246,682,0,0},
        {33,118,451,20,0},
        {33,174,471,20,0},
        {33,110,658,10,0},
        {33,210,298,-20,0},
        {33,154,558,-10,0},
        {33,222,546,-10,0},
        {33,178,670,10,0},
        {35,302,698,-270,0},
        {34,270,714,-180,0},
        {14,234,518,200,0},
        {33,38,646,10,0},
        {14,70,622,-20,0},
        {0,138,538,0,0},
        {0,170,230,0,0},
        {0,298,298,0,0},
        {0,146,638,0,0},
        {0,186,530,0,0},
        {0,206,392,0,0},
        {0,270,198,0,0},
        {0,298,454,0,0},
        {0,298,378,0,0},
        {0,290,682,0,0},
        {0,198,646,0,0},
        {-1}
	},//10
	{
        {33,102,218,-90,0},
        {12,10,246,-90,0},
        {12,10,446,-90,0},
        {27,10,370,-90,0},
        {33,58,458,-90,0},
        {33,58,250,-90,0},
        {29,162,294,0,0},
        {4,38,166,0,0},
        {12,234,342,20,0},
        {12,306,306,20,0},
        {34,230,430,90,0},
        {34,230,394,90,0},
        {35,122,274,0,0},
        {12,235,243,-30,0},
        {14,30,286,-100,0},
        {35,86,162,0,0},
        {34,5,183,-140,0},
        {33,278,482,-90,0},
        {34,230,470,90,0},
        {35,214,518,-90,0},
        {28,282,382,-40,0},
        {12,10,510,-90,0},
        {33,58,522,-90,0},
        {35,38,566,-230,0},
        {4,202,410,0,0},
        {35,298,562,170,0},
        {4,242,138,0,0},
        {12,306,266,150,0},
        {12,238,182,220,0},
        {12,302,146,40,0},
        {34,278,534,-90,0},
        {35,110,518,0,0},
        {0,254,506,0,0},
        {0,78,242,0,0},
        {0,34,542,0,0},
        {0,202,358,0,0},
        {0,302,374,0,0},
        {0,302,450,0,0},
        {0,254,458,0,0},
        {0,282,326,0,0},
        {0,242,270,0,0},
        {0,278,174,0,0},
        {0,302,530,0,0},
        {-1}
	},//11
	{
        {12,222,262,20,0},
        {10,298,350,75,0},
        {28,158,234,10,0},
        {10,246,414,85,0},
        {10,166,438,140,0},
        {10,94,394,-175,0},
        {10,74,314,-135,0},
        {33,69,195,20,0},
        {21,79,217,-20,0},
        {21,47,205,-20,0},
        {21,63,211,-20,0},
        {4,294,238,0,0},
        {21,31,199,-20,0},
        {21,95,223,-20,0},
        {33,49,253,200,0},
        {21,23,227,160,0},
        {21,39,233,160,0},
        {21,55,239,160,0},
        {21,71,245,160,0},
        {21,87,251,160,0},
        {0,154,342,0,0},
        {0,234,298,0,0},
        {0,186,282,0,0},
        {-1}
	},//12
	{
        {4,294,194,0,0},
        {33,39,295,-20,0},
        {21,17,321,380,0},
        {21,71,301,380,0},
        {21,35,313,380,0},
        {21,53,307,380,0},
        {12,222,414,10,0},
        {12,134,398,10,0},
        {27,62,378,190,0},
        {10,294,458,80,0},
        {28,94,270,160,0},
        {16,166,262,0,0},
        {33,34,150,20,0},
        {21,53,175,-20,0},
        {21,33,167,-20,0},
        {21,13,159,-20,0},
        {16,166,222,0,0},
        {12,126,182,20,0},
        {10,250,382,190,0},
        {0,106,422,0,0},
        {0,31,327,0,0},
        {0,63,317,0,0},
        {0,150,430,0,0},
        {0,15,171,0,0},
        {0,41,181,0,0},
        {-1}
	},//13
	{
        {10,270,446,90,0},
        {16,174,474,90,0},
        {10,34,442,-185,0},
        {14,46,258,270,0},
        {16,214,474,90,0},
        {10,30,186,-100,0},
        {14,46,362,100,0},
        {28,306,314,90,0},
        {6,218,402,180,0},
        {6,94,402,180,0},
        {27,14,338,-90,0},
        {14,290,230,-90,0},
        {14,286,342,90,0},
        {14,194,438,190,0},
        {14,46,194,0,0},
        {14,126,442,180,0},
        {14,266,434,190,0},
        {10,230,182,-5,0},
        {14,290,178,-90,0},
        {6,94,222,0,0},
        {6,222,226,0,0},
        {11,325,419,150,0},
        {21,305,393,200,0},
        {14,46,438,90,0},
        {14,214,198,-50,0},
        {16,134,474,90,0},
        {16,94,474,90,0},
        {28,178,150,0,0},
        {11,-5,383,-100,0},
        {6,94,158,0,0},
        {0,94,378,0,0},
        {0,226,378,0,0},
        {0,162,378,0,0},
        {0,94,310,0,0},
        {0,226,306,0,0},
        {0,94,242,0,0},
        {0,166,242,0,0},
        {0,226,242,0,0},
        {-1}
	},//14
	{
        {10,242,226,5,0},
        {11,325,419,150,0},
        {21,305,393,200,0},
        {14,298,238,-90,0},
        {28,194,190,10,0},
        {11,18,170,0,0},
        {11,62,146,0,0},
        {21,51,175,-10,0},
        {21,69,179,-10,0},
        {14,18,230,-90,0},
        {14,22,290,-60,0},
        {14,298,322,-130,0},
        {28,90,530,190,0},
        {27,222,530,170,0},
        {12,154,598,180,0},
        {21,107,579,180,0},
        {21,125,579,180,0},
        {21,143,579,180,0},
        {21,161,579,180,0},
        {21,179,579,180,0},
        {4,294,190,0,0},
        {4,294,142,0,0},
        {21,197,579,180,0},
        {11,262,510,130,0},
        {12,294,454,130,0},
        {8,98,318,0,0},
        {8,214,318,0,0},
        {12,30,478,220,0},
        {0,258,438,0,0},
        {0,118,402,0,0},
        {0,54,434,0,0},
        {0,54,350,0,0},
        {0,162,314,0,0},
        {0,198,402,0,0},
        {0,258,346,0,0},
        {0,226,230,0,0},
        {0,146,254,0,0},
        {0,58,214,0,0},
        {-1}
	}//15
};

int chapter3height[] = {
	0, 2, 1, 1, 1,
    0, 1, 0, 2, 2,
    1, 0, 0, 0, 1
};

int chapter3time[] = {
	10, 40, 30, 20, 30, 
	20, 35, 35, 45, 30, 
	45, 10, 20, 15, 25
};

#pragma mark chapter4
int chapter4data[][128][5] = {
	{
        {12,22,218,0,0},
        {12,318,218,0,0},
        {20,294,238,0,0},
        {20,26,238,0,0},
        {15,254,294,0,0},
        {16,254,326,0,0},
        {16,66,246,0,0},
        {16,66,286,0,0},
        {16,66,326,0,0},
        {2,214,278,-50,0},
        {28,310,386,0,0},
        {12,194,290,30,0},
        {12,114,362,30,0},
        {0,294,270,0,0},
        {0,294,326,0,0},
        {0,294,298,0,0},
        {0,210,342,0,0},
        {0,178,326,0,0},
        {0,150,310,0,0},
        {0,26,278,0,0},
        {0,26,322,0,0},
        {0,26,362,0,0},
        {0,110,254,0,0},
        {0,110,218,0,0},
        {0,110,186,0,0},
        {-1}
	},//1
	{
        {11,222,386,-10,0},
        {11,30,469,-10,0},
        {26,222,418,360,0},
        {26,30,501,0,0},
        {2,226,466,230,0},
        {25,286,530,-40,0},
        {25,26,180,0,0},
        {11,306,502,30,0},
        {11,314,278,-300,0},
        {29,162,370,0,0},
        {4,30,283,0,0},
        {20,26,408,180,0},
        {20,286,294,-70,0},
        {11,26,440,170,0},
        {11,22,147,-10,0},
        {0,110,332,0,0},
        {0,30,542,0,0},
        {0,30,354,0,0},
        {0,254,558,0,0},
        {0,214,574,0,0},
        {-1}
	},//2
	{
        {11,2,270,-100,0},
        {20,34,270,-270,0},
        {16,238,470,90,0},
        {16,70,470,90,0},
        {20,238,446,-180,0},
        {25,70,446,180,0},
        {25,298,322,0,0},
        {14,150,378,0,0},
        {12,318,302,0,0},
        {33,122,438,140,0},
        {33,182,438,220,0},
        {33,294,438,140,0},
        {33,18,438,-140,0},
        {4,158,294,0,0},
        {0,238,210,0,0},
        {0,306,178,0,0},
        {0,270,194,0,0},
        {0,198,226,0,0},
        {0,298,406,0,0},
        {0,298,358,0,0},
        {0,66,270,0,0},
        {0,98,346,0,0},
        {0,78,406,0,0},
        {-1}
	},//3
	{
        {12,66,278,0,0},
        {12,166,278,0,0},
        {20,50,250,180,0},
        {20,162,298,0,0},
        {2,46,170,50,0},
        {21,18,294,0,0},
        {21,50,294,0,0},
        {21,82,294,0,0},
        {21,114,294,0,0},
        {12,22,370,-10,0},
        {16,46,390,0,0},
        {16,46,430,0,0},
        {2,298,182,-50,0},
        {4,270,318,0,0},
        {6,278,414,-40,0},
        {21,22,386,10,0},
        {10,298,454,80,0},
        {14,170,462,190,0},
        {2,162,418,90,0},
        {0,18,414,0,0},
        {0,202,226,0,0},
        {0,130,214,0,0},
        {0,282,206,0,0},
        {0,266,390,0,0},
        {0,218,462,0,0},
        {0,162,342,0,0},
        {0,162,378,0,0},
        {0,94,462,0,0},
        {-1}
	},//4
	{
        {10,198,322,85,0},
        {10,146,298,-145,0},
        {12,278,130,-20,0},
        {20,306,150,-90,0},
        {16,314,206,100,0},
        {16,70,222,0,0},
        {16,70,262,0,0},
        {16,70,302,0,0},
        {20,38,218,0,0},
        {27,10,382,-90,0},
        {12,22,198,0,0},
        {12,318,402,20,0},
        {12,327,283,20,0},
        {14,102,166,-170,0},
        {16,182,394,0,0},
        {12,222,346,-30,0},
        {34,226,274,-90,0},
        {34,226,250,-90,0},
        {0,294,426,0,0},
        {0,258,410,0,0},
        {0,206,386,0,0},
        {0,238,366,0,0},
        {0,206,290,0,0},
        {0,182,322,0,0},
        {0,150,310,0,0},
        {0,38,262,0,0},
        {0,38,310,0,0},
        {0,38,362,0,0},
        {0,58,170,0,0},
        {0,50,154,0,0},
        {0,38,170,0,0},
        {-1}
	},//5
	{
        {12,162,174,-10,0},
        {12,134,254,-10,0},
        {10,18,234,-130,0},
        {28,306,218,80,0},
        {12,66,190,-10,0},
        {15,314,246,10,0},
        {20,290,306,180,0},
        {20,38,158,-240,0},
        {28,254,302,80,0},
        {10,10,318,220,0},
        {12,254,158,-10,0},
        {12,202,242,-10,0},
        {10,14,406,-150,0},
        {16,18,170,150,0},
        {33,126,346,-10,0},
        {33,198,334,-10,0},
        {14,290,358,-90,0},
        {14,290,402,-80,0},
        {14,290,450,-170,0},
        {14,210,310,60,0},
        {33,282,326,0,0},
        {14,274,234,40,0},
        {0,238,194,0,0},
        {0,186,206,0,0},
        {0,126,218,0,0},
        {0,206,278,0,0},
        {0,154,290,0,0},
        {0,102,298,0,0},
        {0,218,362,0,0},
        {0,162,374,0,0},
        {0,102,386,0,0},
        {0,290,374,0,0},
        {0,290,418,0,0},
        {0,238,458,0,0},
        {0,178,426,0,0},
        {-1}
	},//6
	{
        {20,286,282,270,0},
        {20,286,458,-90,0},
        {16,10,458,0,0},
        {16,310,458,0,0},
        {2,2,318,0,0},
        {27,30,178,0,0},
        {25,34,458,90,0},
        {33,38,430,0,0},
        {33,118,430,0,0},
        {33,198,430,0,0},
        {33,278,430,0,0},
        {33,198,254,0,0},
        {33,274,254,0,0},
        {26,190,282,90,0},
        {26,306,338,-90,0},
        {33,198,310,180,0},
        {33,278,310,180,0},
        {16,310,282,0,0},
        {16,166,282,0,0},
        {35,17,413,180,0},
        {25,14,370,90,0},
        {28,162,178,0,0},
        {14,282,154,-80,0},
        {14,274,222,-170,0},
        {35,298,238,90,0},
        {33,314,178,90,0},
        {6,158,346,90,0},
        {8,182,190,0,0},
        {8,10,194,0,0},
        {6,262,382,0,0},
        {14,202,222,180,0},
        {21,215,413,180,0},
        {21,249,413,180,0},
        {21,283,413,180,0},
        {35,230,178,90,0},
        {35,298,122,0,0},
        {2,234,338,50,0},
        {2,199,331,120,0},
        {21,179,413,180,0},
        {21,309,401,-90,0},
        {21,309,373,-90,0},
        {34,158,418,270,0},
        {34,158,402,270,0},
        {34,206,194,180,0},
        {35,138,414,90,0},
        {0,58,370,0,0},
        {0,74,458,0,0},
        {0,130,458,0,0},
        {0,190,458,0,0},
        {0,250,458,0,0},
        {0,218,286,0,0},
        {0,254,286,0,0},
        {0,230,222,0,0},
        {0,262,358,0,0},
        {0,178,394,0,0},
        {0,118,362,0,0},
        {0,34,218,0,0},
        {0,86,250,0,0},
        {0,130,286,0,0},
        {-1}
	},//7
	{
        {20,302,302,0,0},
        {15,230,474,0,0},
        {2,243,344,110,0},
        {20,14,150,90,0},
        {10,306,458,80,0},
        {16,230,446,0,0},
        {2,190,330,100,0},
        {2,50,230,70,0},
        {12,218,314,0,0},
        {2,103,215,80,0},
        {12,42,202,0,0},
        {15,290,278,0,0},
        {15,310,278,0,0},
        {27,14,402,-90,0},
        {16,262,290,0,0},
        {14,294,446,180,0},
        {2,290,138,110,0},
        {15,266,330,0,0},
        {15,6,242,0,0},
        {16,6,274,0,0},
        {16,6,314,0,0},
        {2,135,319,100,0},
        {2,159,205,80,0},
        {33,135,195,0,0},
        {28,306,222,90,0},
        {8,302,246,0,0},
        {33,151,307,0,0},
        {0,230,374,0,0},
        {0,198,410,0,0},
        {0,138,398,0,0},
        {0,54,254,0,0},
        {0,114,278,0,0},
        {0,166,238,0,0},
        {0,298,398,0,0},
        {0,270,214,0,0},
        {0,270,158,0,0},
        {0,166,454,0,0},
        {0,50,386,0,0},
        {-1}
	},//8
	{
        {20,302,302,0,0},
        {15,230,474,0,0},
        {2,243,344,110,0},
        {20,14,150,90,0},
        {10,306,458,80,0},
        {16,230,446,0,0},
        {2,190,330,100,0},
        {2,50,230,70,0},
        {12,218,314,0,0},
        {2,103,215,80,0},
        {12,42,202,0,0},
        {15,290,278,0,0},
        {15,310,278,0,0},
        {27,14,402,-90,0},
        {16,262,290,0,0},
        {14,294,446,180,0},
        {2,290,138,110,0},
        {15,266,330,0,0},
        {15,6,242,0,0},
        {16,6,274,0,0},
        {16,6,314,0,0},
        {2,135,319,100,0},
        {2,159,205,80,0},
        {33,135,195,0,0},
        {28,306,222,90,0},
        {8,302,246,0,0},
        {33,151,307,0,0},
        {0,230,374,0,0},
        {0,198,410,0,0},
        {0,138,398,0,0},
        {0,54,254,0,0},
        {0,114,278,0,0},
        {0,166,238,0,0},
        {0,298,398,0,0},
        {0,270,214,0,0},
        {0,270,158,0,0},
        {0,166,454,0,0},
        {0,50,386,0,0},
        {-1}
	},//9
	{
        {12,278,390,20,0},
        {12,66,318,-20,0},
        {12,258,238,20,0},
        {24,186,358,-70,0},
        {24,154,286,70,0},
        {24,170,206,-70,0},
        {29,162,394,0,0},
        {0,302,430,0,0},
        {0,274,422,0,0},
        {0,246,410,0,0},
        {0,34,366,0,0},
        {0,62,354,0,0},
        {0,90,342,0,0},
        {0,294,278,0,0},
        {0,262,266,0,0},
        {0,230,254,0,0},
        {0,162,322,0,0},
        {0,162,250,0,0},
        {0,162,170,0,0},
        {0,90,190,0,0},
        {0,50,158,0,0},
        {-1}
	},//10
	{
        {4,34,246,0,0},
        {4,218,294,0,0},
        {24,286,498,-70,0},
        {24,34,402,70,0},
        {33,210,470,20,0},
        {33,110,370,-20,0},
        {4,174,494,0,0},
        {6,202,498,90,0},
        {33,58,546,0,0},
        {14,138,582,180,0},
        {21,26,530,180,0},
        {21,46,530,180,0},
        {21,66,530,180,0},
        {21,86,530,180,0},
        {33,274,582,0,0},
        {21,282,566,180,0},
        {21,262,566,180,0},
        {21,242,566,180,0},
        {21,302,566,180,0},
        {0,82,578,0,0},
        {0,274,526,0,0},
        {0,226,510,0,0},
        {0,94,410,0,0},
        {0,138,394,0,0},
        {0,38,478,0,0},
        {0,30,578,0,0},
        {-1}
	},//11
	{
        {12,26,286,-20,0},
        {28,138,250,-20,0},
        {12,110,214,20,0},
        {15,58,138,0,0},
        {16,58,170,0,0},
        {25,22,130,0,0},
        {15,226,618,0,0},
        {25,262,622,0,0},
        {12,278,602,0,0},
        {21,34,258,190,0},
        {21,14,266,200,0},
        {24,258,662,110,0},
        {15,222,642,20,0},
        {12,18,110,0,0},
        {33,250,329,50,0},
        {20,294,698,-90,0},
        {20,294,574,180,0},
        {4,298,185,0,0},
        {33,274,241,90,0},
        {33,226,257,90,0},
        {4,250,209,0,0},
        {33,274,397,90,0},
        {16,314,698,180,0},
        {15,162,246,10,0},
        {12,134,522,20,0},
        {15,306,618,0,0},
        {15,306,666,0,0},
        {15,306,642,0,0},
        {11,206,419,0,0},
        {27,66,498,180,0},
        {15,50,350,10,0},
        {6,178,566,-70,0},
        {6,194,598,20,0},
        {6,210,550,20,0},
        {6,226,582,-70,0},
        {0,98,238,0,0},
        {0,42,218,0,0},
        {0,258,690,0,0},
        {0,42,606,0,0},
        {0,138,350,0,0},
        {0,18,366,0,0},
        {0,18,318,0,0},
        {0,302,373,0,0},
        {0,194,226,0,0},
        {0,194,270,0,0},
        {0,302,425,0,0},
        {0,18,422,0,0},
        {0,62,303,0,0},
        {0,42,702,0,0},
        {0,42,542,0,0},
        {0,138,558,0,0},
        {0,258,646,0,0},
        {0,138,646,0,0},
        {-1}
	},//12
	{
        {33,310,322,90,0},
        {33,310,398,90,0},
        {33,70,414,20,0},
        {21,47,389,160,0},
        {21,65,395,160,0},
        {21,81,403,160,0},
        {21,99,409,160,0},
        {33,274,594,0,0},
        {21,306,578,180,0},
        {21,286,578,180,0},
        {21,266,578,180,0},
        {21,246,578,180,0},
        {24,282,514,-70,0},
        {27,22,206,-20,0},
        {28,134,206,20,0},
        {8,6,230,0,0},
        {34,37,411,40,0},
        {34,53,425,40,0},
        {34,95,433,0,0},
        {34,73,433,0,0},
        {33,262,450,90,0},
        {33,262,374,90,0},
        {33,310,474,90,0},
        {8,150,230,0,0},
        {33,310,242,90,0},
        {4,234,198,0,0},
        {4,286,158,0,0},
        {27,126,406,-20,0},
        {28,238,406,20,0},
        {33,179,539,-30,0},
        {21,146,540,-150,0},
        {21,162,530,-150,0},
        {21,178,520,-150,0},
        {21,194,512,-150,0},
        {34,156,562,-10,0},
        {34,178,558,-10,0},
        {34,196,548,-50,0},
        {34,210,532,-50,0},
        {24,234,306,120,0},
        {33,262,270,90,0},
        {33,210,238,90,0},
        {33,262,210,90,0},
        {33,310,166,90,0},
        {11,182,230,0,0},
        {34,215,377,0,0},
        {34,229,377,0,0},
        {34,249,377,0,0},
        {21,223,361,180,0},
        {21,239,361,180,0},
        {0,74,338,0,0},
        {0,74,286,0,0},
        {0,74,390,0,0},
        {0,286,546,0,0},
        {0,182,502,0,0},
        {0,182,434,0,0},
        {0,182,470,0,0},
        {0,286,398,0,0},
        {0,286,258,0,0},
        {0,182,270,0,0},
        {-1}
	},//13
	{
        {28,286,178,10,0},
        {15,302,202,10,0},
        {15,138,206,-10,0},
        {27,150,178,-10,0},
        {16,18,190,90,0},
        {16,58,190,90,0},
        {11,98,198,0,0},
        {16,82,238,0,0},
        {16,82,278,0,0},
        {20,42,166,180,0},
        {20,42,214,0,0},
        {27,18,350,-90,0},
        {15,14,378,-10,0},
        {8,82,310,0,0},
        {8,106,234,0,0},
        {2,42,106,90,0},
        {12,314,318,0,0},
        {25,298,338,0,0},
        {25,18,458,140,0},
        {12,262,378,90,0},
        {8,182,438,0,0},
        {6,230,354,0,0},
        {6,230,366,0,0},
        {6,230,378,0,0},
        {6,246,278,90,0},
        {6,246,238,90,0},
        {29,118,454,0,0},
        {0,102,394,0,0},
        {0,294,370,0,0},
        {0,294,410,0,0},
        {0,122,274,0,0},
        {0,162,246,0,0},
        {0,198,218,0,0},
        {0,230,394,0,0},
        {0,62,422,0,0},
        {0,230,426,0,0},
        {0,298,278,0,0},
        {0,298,250,0,0},
        {0,266,274,0,0},
        {-1}
	},//14
	{
        {33,274,310,-90,0},
        {33,274,412,-90,0},
        {33,274,568,-90,0},
        {33,274,648,-90,0},
        {33,70,569,-70,0},
        {10,294,744,90,0},
        {16,234,774,90,0},
        {16,194,774,90,0},
        {16,154,774,90,0},
        {16,114,774,90,0},
        {16,74,774,-90,0},
        {10,18,738,180,0},
        {35,258,702,100,0},
        {14,266,742,190,0},
        {14,298,666,-90,0},
        {14,298,574,-90,0},
        {14,298,474,-80,0},
        {14,298,397,-80,0},
        {14,298,305,-80,0},
        {14,302,221,-90,0},
        {26,286,806,270,0},
        {26,30,627,0,0},
        {25,34,806,-270,0},
        {25,238,426,570,0},
        {33,10,778,0,0},
        {33,298,778,0,0},
        {16,310,806,0,0},
        {16,10,806,0,0},
        {12,2,607,0,0},
        {8,106,738,0,0},
        {28,174,190,20,0},
        {27,46,190,-20,0},
        {28,222,512,20,0},
        {27,90,513,-20,0},
        {35,246,477,260,0},
        {21,98,377,0,0},
        {21,82,377,0,0},
        {21,114,377,0,0},
        {12,182,445,20,0},
        {4,86,431,0,0},
        {33,38,497,-90,0},
        {33,38,417,-90,0},
        {35,18,329,-80,0},
        {33,86,360,0,0},
        {21,66,377,0,0},
        {35,50,585,100,0},
        {35,22,226,80,0},
        {8,106,714,0,0},
        {16,250,446,60,0},
        {12,230,230,30,0},
        {24,242,550,130,0},
        {0,26,275,0,0},
        {0,82,806,0,0},
        {0,162,810,0,0},
        {0,238,806,0,0},
        {0,106,646,0,0},
        {0,202,642,0,0},
        {0,102,562,0,0},
        {0,198,562,0,0},
        {0,14,525,0,0},
        {0,70,218,0,0},
        {0,14,401,0,0},
        {0,218,391,0,0},
        {0,150,218,0,0},
        {0,110,302,0,0},
        {0,198,270,0,0},
        {0,14,458,0,0},
        {-1}
	}//15
};

int chapter4height[] = {
	0, 1, 0, 0, 0,
    0, 0, 0, 0, 0,
    1, 2, 1, 0, 3
};

int chapter4time[] = {
	15, 15, 15, 15, 20, 
	15, 25, 15, 15, 20, 
	20, 35, 20, 25, 45
};

#pragma mark chapter5
int chapter5data[][128][5] = {
	{
        {12,294,266,60,0},
        {12,246,182,60,0},
        {10,302,358,70,0},
        {12,194,306,0,0},
        {12,130,306,0,0},
        {12,214,390,180,0},
        {12,102,390,180,0},
        {12,214,258,240,0},
        {12,106,258,120,0},
        {12,26,274,-60,0},
        {10,18,358,185,0},
        {12,78,182,-60,0},
        {37,230,182,-60,0},
        {39,106,374,90,0},
        {0,162,342,0,0},
        {0,78,250,0,0},
        {0,250,250,0,0},
        {0,282,302,0,0},
        {0,42,302,0,0},
        {0,110,186,0,0},
        {-1}
	},//1
	{
        {12,94,418,-60,0},
        {12,58,482,-60,0},
        {36,102,518,600,0},
        {38,282,546,0,0},
        {37,218,518,120,0},
        {4,162,282,0,0},
        {12,226,418,60,0},
        {12,266,490,60,0},
        {28,158,422,120,0},
        {12,134,489,120,0},
        {12,186,490,-120,0},
        {12,74,294,220,0},
        {12,242,298,140,0},
        {16,202,350,0,0},
        {16,118,350,0,0},
        {10,274,218,15,0},
        {10,42,210,250,0},
        {4,62,226,0,0},
        {4,242,226,0,0},
        {12,298,602,90,0},
        {12,214,598,-90,0},
        {10,266,694,90,0},
        {14,242,686,190,0},
        {12,158,654,0,0},
        {12,106,598,90,0},
        {10,50,690,-185,0},
        {12,26,598,-90,0},
        {12,158,718,180,0},
        {33,70,538,180,0},
        {33,226,178,0,0},
        {33,94,178,0,0},
        {39,94,606,0,0},
        {0,102,466,0,0},
        {0,162,346,0,0},
        {0,214,466,0,0},
        {0,254,578,0,0},
        {0,66,574,0,0},
        {0,162,686,0,0},
        {-1}
	},//2
	{
        {15,162,190,0,0},
        {16,162,222,0,0},
        {16,162,262,0,0},
        {24,162,314,0,0},
        {16,162,370,0,0},
        {12,102,190,10,0},
        {20,14,346,90,0},
        {20,206,198,190,0},
        {12,230,218,-10,0},
        {12,110,398,-10,0},
        {12,226,378,-10,0},
        {4,306,210,0,0},
        {2,246,278,-60,0},
        {2,62,242,70,0},
        {14,302,462,180,0},
        {28,270,438,80,0},
        {26,294,134,-50,0},
        {26,14,442,90,0},
        {15,318,122,50,0},
        {15,306,110,50,0},
        {0,234,350,0,0},
        {0,210,322,0,0},
        {0,242,318,0,0},
        {0,66,298,0,0},
        {0,106,290,0,0},
        {0,78,262,0,0},
        {0,62,438,0,0},
        {0,110,430,0,0},
        {0,162,422,0,0},
        {-1}
	},//3
	{
        {12,294,274,10,0},
        {11,138,226,0,0},
        {15,50,218,10,0},
        {16,50,190,0,0},
        {15,50,118,0,0},
        {12,30,354,-10,0},
        {24,90,234,-80,0},
        {24,130,338,-100,0},
        {12,218,194,-10,0},
        {12,274,386,0,0},
        {21,238,402,0,0},
        {21,270,402,0,0},
        {21,302,402,0,0},
        {2,46,282,0,0},
        {2,222,438,0,0},
        {16,50,150,0,0},
        {20,306,118,-90,0},
        {20,18,378,10,0},
        {27,178,246,20,0},
        {29,110,298,0,0},
        {0,194,222,0,0},
        {0,222,218,0,0},
        {0,250,214,0,0},
        {0,290,302,0,0},
        {0,266,298,0,0},
        {0,242,294,0,0},
        {0,22,206,0,0},
        {0,22,182,0,0},
        {0,22,158,0,0},
        {0,86,374,0,0},
        {0,134,358,0,0},
        {0,110,366,0,0},
        {-1}
	},//4
	{
        {14,18,266,-90,0},
        {14,18,370,-80,0},
        {14,18,472,-80,0},
        {12,46,482,90,0},
        {10,18,574,180,0},
        {14,22,562,-20,0},
        {24,142,514,100,0},
        {12,142,438,-50,0},
        {38,318,550,10,0},
        {33,214,530,10,0},
        {12,46,362,90,0},
        {36,178,414,50,0},
        {24,166,362,70,0},
        {33,90,390,-20,0},
        {12,146,286,30,0},
        {12,294,590,160,0},
        {33,242,332,-20,0},
        {12,238,134,20,0},
        {20,298,342,0,0},
        {20,150,250,90,0},
        {16,298,318,90,0},
        {16,126,250,0,0},
        {27,146,170,-50,0},
        {16,126,210,0,0},
        {15,126,178,0,0},
        {14,98,582,0,0},
        {2,294,470,50,0},
        {2,294,498,120,0},
        {4,214,402,0,0},
        {0,154,330,0,0},
        {0,110,306,0,0},
        {0,94,418,0,0},
        {0,222,366,0,0},
        {0,258,350,0,0},
        {0,302,194,0,0},
        {0,254,174,0,0},
        {0,214,158,0,0},
        {0,214,298,0,0},
        {0,254,274,0,0},
        {0,302,242,0,0},
        {0,230,510,0,0},
        {0,290,514,0,0},
        {-1}
	},//5
	{
        {16,70,258,0,0},
        {20,30,250,0,0},
        {12,22,230,0,0},
        {15,74,346,0,0},
        {16,74,378,0,0},
        {24,26,342,-60,0},
        {12,314,226,0,0},
        {20,298,246,0,0},
        {16,262,254,0,0},
        {12,282,398,20,0},
        {15,130,230,0,0},
        {16,130,262,0,0},
        {16,130,302,0,0},
        {12,82,174,20,0},
        {2,222,350,-50,0},
        {2,302,350,30,0},
        {2,222,166,90,0},
        {6,26,398,0,0},
        {6,26,362,0,0},
        {4,102,246,0,0},
        {24,170,354,100,0},
        {29,170,406,0,0},
        {0,222,202,0,0},
        {0,222,242,0,0},
        {0,222,278,0,0},
        {0,106,218,0,0},
        {0,78,202,0,0},
        {0,50,190,0,0},
        {0,26,418,0,0},
        {0,26,382,0,0},
        {0,26,350,0,0},
        {0,306,438,0,0},
        {0,278,426,0,0},
        {0,250,414,0,0},
        {-1}
	},//6
	{
        {38,118,326,40,0},
        {38,90,682,320,0},
        {36,18,794,90,0},
        {37,226,254,320,0},
        {39,186,390,-40,0},
        {33,130,334,90,0},
        {33,194,334,-90,0},
        {33,130,294,90,0},
        {33,226,240,40,0},
        {33,34,278,0,0},
        {14,162,186,-90,0},
        {14,162,270,-90,0},
        {14,162,358,-90,0},
        {33,258,308,-90,0},
        {33,70,390,90,0},
        {33,6,302,-90,0},
        {33,6,386,-90,0},
        {33,70,473,90,0},
        {33,6,534,-90,0},
        {33,194,420,90,0},
        {35,22,594,-180,0},
        {33,86,614,540,0},
        {33,6,454,-90,0},
        {14,38,569,-20,0},
        {33,130,474,-90,0},
        {35,122,538,80,0},
        {35,82,538,190,0},
        {34,102,554,0,0},
        {33,194,478,90,0},
        {35,210,534,180,0},
        {35,246,534,90,0},
        {35,210,414,180,0},
        {35,294,362,0,0},
        {14,94,585,0,0},
        {33,262,472,90,0},
        {34,242,432,180,0},
        {14,222,581,0,0},
        {33,230,614,0,0},
        {35,294,598,90,0},
        {33,310,542,90,0},
        {33,310,462,90,0},
        {33,310,418,90,0},
        {34,266,346,0,0},
        {4,162,446,0,0},
        {33,226,690,180,0},
        {33,6,694,-90,0},
        {39,186,614,0,0},
        {4,38,310,0,0},
        {16,86,509,90,0},
        {16,114,509,-90,0},
        {25,102,485,-180,0},
        {35,114,242,0,0},
        {33,82,166,0,0},
        {33,6,242,-90,0},
        {25,70,634,0,0},
        {33,158,666,220,0},
        {33,242,822,150,0},
        {34,122,630,-90,0},
        {21,198,630,0,0},
        {21,218,630,0,0},
        {21,238,630,0,0},
        {21,258,630,0,0},
        {33,298,790,-210,0},
        {35,294,630,0,0},
        {33,310,686,90,0},
        {33,310,746,90,0},
        {14,282,650,-80,0},
        {14,282,738,-100,0},
        {35,22,638,-90,0},
        {35,22,738,-90,0},
        {35,106,654,270,0},
        {33,6,770,-90,0},
        {33,82,838,180,0},
        {33,174,838,180,0},
        {33,106,838,180,0},
        {14,122,670,-40,0},
        {14,166,710,0,0},
        {28,258,754,90,0},
        {35,22,822,-180,0},
        {35,22,182,-90,0},
        {34,86,226,0,0},
        {34,62,226,0,0},
        {0,162,502,0,0},
        {0,98,366,0,0},
        {0,38,386,0,0},
        {0,38,457,0,0},
        {0,38,533,0,0},
        {0,162,578,0,0},
        {0,274,578,0,0},
        {0,286,478,0,0},
        {0,270,388,0,0},
        {0,226,328,0,0},
        {0,98,254,0,0},
        {0,282,766,0,0},
        {0,234,790,0,0},
        {0,58,790,0,0},
        {0,66,670,0,0},
        {0,98,198,0,0},
        {0,138,810,0,0},
        {-1}
	},//7
	{
        {12,50,238,90,0},
        {12,50,305,90,0},
        {28,254,194,10,0},
        {27,122,194,-10,0},
        {14,18,178,-80,0},
        {14,18,302,-90,0},
        {14,22,377,-20,0},
        {10,82,234,-100,0},
        {10,298,238,5,0},
        {38,106,409,0,0},
        {38,174,409,0,0},
        {38,242,409,0,0},
        {38,310,409,0,0},
        {35,18,397,170,0},
        {36,294,358,-90,0},
        {15,310,358,90,0},
        {39,310,502,0,0},
        {39,242,502,0,0},
        {39,174,502,0,0},
        {39,106,502,0,0},
        {33,34,450,-90,0},
        {33,34,534,-90,0},
        {10,290,578,90,0},
        {12,202,602,-180,0},
        {12,94,602,-180,0},
        {10,62,574,175,0},
        {15,310,450,90,0},
        {37,294,450,-90,0},
        {14,18,242,-80,0},
        {34,312,370,40,0},
        {34,312,464,40,0},
        {0,82,362,0,0},
        {0,214,362,0,0},
        {0,142,362,0,0},
        {0,142,546,0,0},
        {0,82,450,0,0},
        {0,210,450,0,0},
        {0,142,450,0,0},
        {0,82,546,0,0},
        {0,210,546,0,0},
        {-1}
	},//8
	{
        {12,162,398,-90,0},
        {12,10,398,-90,0},
        {12,142,398,90,0},
        {12,74,466,-180,0},
        {12,230,466,180,0},
        {12,298,402,90,0},
        {38,262,370,0,0},
        {39,106,370,0,0},
        {28,146,182,0,0},
        {27,170,182,0,0},
        {14,258,186,-110,0},
        {14,58,186,-60,0},
        {35,298,222,180,0},
        {35,18,222,90,0},
        {33,34,158,-90,0},
        {33,282,158,90,0},
        {36,30,234,50,0},
        {37,290,238,-50,0},
        {14,258,138,-90,0},
        {14,58,138,-90,0},
        {0,110,406,0,0},
        {0,202,410,0,0},
        {0,266,410,0,0},
        {0,46,406,0,0},
        {-1}
	},//9
	{
        {12,274,250,90,0},
        {12,274,358,90,0},
        {12,274,458,90,0},
        {12,274,674,90,0},
        {10,290,818,90,0},
        {28,250,472,10,0},
        {33,134,472,90,0},
        {33,134,472,0,0},
        {35,154,492,90,0},
        {35,114,492,-180,0},
        {35,154,452,0,0},
        {35,114,452,-90,0},
        {14,302,294,-90,0},
        {14,302,508,-90,0},
        {14,302,722,-100,0},
        {8,206,722,0,0},
        {8,262,638,0,0},
        {4,194,206,0,0},
        {38,162,440,150,0},
        {38,258,396,30,0},
        {38,150,354,150,0},
        {38,262,308,30,0},
        {38,150,262,150,0},
        {37,162,818,-150,0},
        {12,79,840,180,0},
        {36,250,202,-40,0},
        {38,206,782,0,0},
        {39,134,702,90,0},
        {39,134,638,90,0},
        {39,134,574,90,0},
        {39,134,766,90,0},
        {12,166,826,-210,0},
        {15,228,846,180,0},
        {15,244,846,180,0},
        {12,210,854,-90,0},
        {39,134,830,90,0},
        {8,206,650,0,0},
        {10,18,809,-180,0},
        {25,50,818,180,0},
        {25,102,522,0,0},
        {24,38,473,90,0},
        {35,54,734,0,0},
        {35,14,738,-180,0},
        {20,22,658,40,0},
        {20,258,594,-90,0},
        {8,262,554,0,0},
        {12,274,566,90,0},
        {39,242,622,90,0},
        {4,294,160,0,0},
        {10,254,214,5,0},
        {34,86,473,0,0},
        {34,81,488,90,0},
        {34,85,504,0,0},
        {34,103,504,0,0},
        {16,6,642,50,0},
        {12,185,179,0,0},
        {28,102,174,0,0},
        {8,126,182,0,0},
        {14,22,436,0,0},
        {33,134,392,90,0},
        {33,134,308,90,0},
        {33,134,224,90,0},
        {14,102,396,180,0},
        {14,22,360,0,0},
        {14,102,320,190,0},
        {14,22,284,0,0},
        {35,14,212,-90,0},
        {34,78,822,90,0},
        {0,30,320,0,0},
        {0,206,578,0,0},
        {0,170,542,0,0},
        {0,178,374,0,0},
        {0,238,326,0,0},
        {0,182,286,0,0},
        {0,234,422,0,0},
        {0,242,686,0,0},
        {0,170,614,0,0},
        {0,170,686,0,0},
        {0,206,502,0,0},
        {0,102,578,0,0},
        {0,102,670,0,0},
        {0,102,754,0,0},
        {0,34,738,0,0},
        {0,22,514,0,0},
        {0,94,360,0,0},
        {0,30,404,0,0},
        {0,94,284,0,0},
        {0,62,546,0,0},
        {-1}
	},//10
	{
        {10,198,322,85,0},
        {10,146,298,-145,0},
        {12,258,138,-20,0},
        {12,20,391,-50,0},
        {12,314,274,0,0},
        {28,310,495,90,0},
        {26,282,294,0,0},
        {26,62,374,50,0},
        {20,286,158,-70,0},
        {20,38,493,0,0},
        {16,310,150,-20,0},
        {27,10,658,-90,0},
        {12,2,469,0,0},
        {15,234,286,-30,0},
        {15,246,278,-30,0},
        {10,294,818,85,0},
        {15,14,690,-30,0},
        {15,314,522,20,0},
        {12,38,298,-110,0},
        {12,122,326,70,0},
        {10,22,158,-110,0},
        {14,74,290,-60,0},
        {14,98,350,-60,0},
        {12,10,222,-110,0},
        {12,94,250,70,0},
        {14,50,234,-60,0},
        {14,30,178,-60,0},
        {15,146,370,-20,0},
        {15,158,366,-20,0},
        {15,174,358,-30,0},
        {10,22,814,175,0},
        {12,114,842,-180,0},
        {12,226,842,-180,0},
        {12,290,694,50,0},
        {12,290,610,130,0},
        {14,74,810,0,0},
        {14,22,750,-70,0},
        {34,198,786,180,0},
        {34,94,786,180,0},
        {34,114,786,180,0},
        {34,178,786,180,0},
        {14,214,814,180,0},
        {34,220,786,180,0},
        {34,74,786,180,0},
        {34,238,782,150,0},
        {34,57,782,210,0},
        {21,154,392,20,0},
        {21,170,386,20,0},
        {21,186,378,30,0},
        {0,202,298,0,0},
        {0,170,322,0,0},
        {0,154,290,0,0},
        {0,134,417,0,0},
        {0,258,457,0,0},
        {0,282,738,0,0},
        {0,50,638,0,0},
        {0,206,582,0,0},
        {0,278,341,0,0},
        {0,278,413,0,0},
        {0,138,582,0,0},
        {0,282,798,0,0},
        {0,242,694,0,0},
        {0,146,782,0,0},
        {-1}
	},//11
	{
        {4,246,218,0,0},
        {4,70,218,0,0},
        {33,102,270,90,0},
        {33,190,270,90,0},
        {33,126,270,-90,0},
        {33,38,270,-90,0},
        {33,278,270,90,0},
        {33,214,270,-90,0},
        {33,38,350,-90,0},
        {33,102,350,90,0},
        {33,126,350,-90,0},
        {33,190,350,90,0},
        {33,214,350,-90,0},
        {33,278,350,90,0},
        {33,18,430,-60,0},
        {33,90,434,120,0},
        {33,126,432,-90,0},
        {33,190,432,90,0},
        {33,226,434,-120,0},
        {33,298,426,60,0},
        {25,158,462,180,0},
        {33,158,482,-180,0},
        {34,214,398,-90,0},
        {34,102,402,90,0},
        {33,318,502,90,0},
        {33,73,545,90,0},
        {33,249,541,-90,0},
        {33,2,506,-90,0},
        {28,226,565,20,0},
        {27,94,565,-20,0},
        {15,246,578,40,0},
        {15,74,578,-40,0},
        {33,318,589,90,0},
        {33,2,593,-90,0},
        {25,278,802,-140,0},
        {11,318,634,40,0},
        {11,-7,633,-40,0},
        {36,74,481,-20,0},
        {37,242,481,20,0},
        {38,30,630,-220,0},
        {39,294,626,40,0},
        {33,106,482,20,0},
        {33,210,482,-20,0},
        {34,158,498,0,0},
        {33,290,818,140,0},
        {10,26,818,-190,0},
        {21,158,513,0,0},
        {0,70,312,0,0},
        {0,34,529,0,0},
        {0,158,424,0,0},
        {0,158,312,0,0},
        {0,286,529,0,0},
        {0,246,312,0,0},
        {0,278,682,0,0},
        {0,38,674,0,0},
        {0,118,766,0,0},
        {0,210,766,0,0},
        {-1}
	},//12
	{
        {38,134,221,90,0},
        {38,134,286,90,0},
        {38,134,350,90,0},
        {38,134,414,90,0},
        {38,134,478,90,0},
        {38,134,542,90,0},
        {39,186,538,90,0},
        {39,186,478,90,0},
        {39,186,414,90,0},
        {39,186,350,90,0},
        {39,186,282,90,0},
        {39,186,222,90,0},
        {38,182,554,-40,0},
        {28,106,158,0,0},
        {8,126,170,0,0},
        {8,194,170,0,0},
        {27,214,158,0,0},
        {26,290,482,-110,0},
        {26,30,478,110,0},
        {11,306,162,20,0},
        {11,6,162,-40,0},
        {37,26,178,30,0},
        {36,302,190,-30,0},
        {10,22,574,175,0},
        {10,294,578,85,0},
        {16,314,486,20,0},
        {16,6,482,160,0},
        {16,6,506,70,0},
        {16,314,510,290,0},
        {0,18,333,0,0},
        {0,58,253,0,0},
        {0,270,554,0,0},
        {0,46,550,0,0},
        {0,222,482,0,0},
        {0,266,405,0,0},
        {0,266,253,0,0},
        {0,214,329,0,0},
        {0,302,325,0,0},
        {0,102,482,0,0},
        {0,106,329,0,0},
        {0,54,409,0,0},
        {-1}
	},//13
	{
        {12,46,414,0,0},
        {12,166,402,-10,0},
        {12,270,346,20,0},
        {16,130,386,0,0},
        {2,102,398,50,0},
        {28,174,296,20,0},
        {20,234,146,180,0},
        {20,14,450,90,0},
        {15,66,220,0,0},
        {15,182,226,0,0},
        {16,182,258,0,0},
        {12,134,210,0,0},
        {21,106,226,0,0},
        {21,158,226,0,0},
        {21,134,226,0,0},
        {12,26,202,0,0},
        {25,46,526,0,0},
        {6,26,338,0,0},
        {6,26,294,0,0},
        {6,26,258,0,0},
        {25,26,222,0,0},
        {15,206,266,-10,0},
        {28,274,250,-20,0},
        {15,282,226,-10,0},
        {11,250,190,10,0},
        {12,190,162,10,0},
        {21,202,182,0,0},
        {21,158,174,0,0},
        {12,86,142,10,0},
        {15,314,138,20,0},
        {21,310,158,-10,0},
        {33,66,272,-90,0},
        {33,66,316,-90,0},
        {12,134,486,-20,0},
        {12,22,506,0,0},
        {36,306,618,-90,0},
        {38,182,470,160,0},
        {4,214,222,0,0},
        {27,10,658,-90,0},
        {10,290,698,85,0},
        {12,318,602,90,0},
        {12,38,714,-140,0},
        {12,318,494,90,0},
        {15,10,682,-90,0},
        {27,250,438,0,0},
        {14,94,338,-100,0},
        {0,26,318,0,0},
        {0,26,354,0,0},
        {0,182,344,0,0},
        {0,94,174,0,0},
        {0,42,162,0,0},
        {0,46,686,0,0},
        {0,274,678,0,0},
        {0,122,642,0,0},
        {0,210,638,0,0},
        {0,122,562,0,0},
        {0,210,562,0,0},
        {-1}
	},//14
	{
        {16,242,649,0,0},
        {16,242,609,0,0},
        {16,310,649,0,0},
        {16,310,609,0,0},
        {20,278,601,0,0},
        {12,158,581,0,0},
        {20,258,154,-80,0},
        {12,286,206,20,0},
        {15,138,142,0,0},
        {16,138,170,0,0},
        {12,206,126,-10,0},
        {15,278,118,0,0},
        {21,286,226,-20,0},
        {12,266,581,0,0},
        {28,298,681,0,0},
        {27,18,680,0,0},
        {33,46,214,90,0},
        {33,46,290,90,0},
        {33,46,374,90,0},
        {33,46,458,90,0},
        {14,18,154,-90,0},
        {14,18,254,-90,0},
        {14,18,350,-90,0},
        {14,18,447,-90,0},
        {35,58,506,-170,0},
        {35,12,566,-180,0},
        {33,66,582,-180,0},
        {14,26,551,0,0},
        {28,114,174,10,0},
        {27,166,194,-10,0},
        {8,138,202,0,0},
        {34,234,458,70,0},
        {34,182,462,90,0},
        {34,286,442,60,0},
        {8,222,401,0,0},
        {8,314,349,0,0},
        {8,58,357,0,0},
        {16,282,150,-10,0},
        {8,134,403,0,0},
        {34,130,459,100,0},
        {10,294,544,85,0},
        {15,2,696,-40,0},
        {25,38,600,0,0},
        {16,70,608,0,0},
        {16,70,648,0,0},
        {16,6,644,0,0},
        {16,6,604,0,0},
        {25,162,166,90,0},
        {10,218,630,10,0},
        {10,98,626,-105,0},
        {6,158,634,0,0},
        {6,198,634,0,0},
        {6,118,634,0,0},
        {6,118,647,0,0},
        {6,158,647,0,0},
        {6,198,647,0,0},
        {27,170,666,0,0},
        {28,146,666,0,0},
        {15,318,694,50,0},
        {0,222,333,0,0},
        {0,230,158,0,0},
        {0,206,462,0,0},
        {0,258,446,0,0},
        {0,278,790,0,0},
        {0,138,337,0,0},
        {0,134,257,0,0},
        {0,154,463,0,0},
        {0,98,449,0,0},
        {0,50,786,0,0},
        {0,46,714,0,0},
        {0,130,790,0,0},
        {0,130,714,0,0},
        {0,210,790,0,0},
        {0,210,710,0,0},
        {0,222,257,0,0},
        {0,158,606,0,0},
        {-1}
	}//15
};

int chapter5height[] = {
	0, 2, 0, 0, 1,
    0, 3, 1, 0, 3,
    3, 3, 1, 2, 3
};

int chapter5time[] = {
	10, 15, 25, 35, 45, 
	40, 45, 30, 30, 50, 
	25, 45, 30, 45, 70
};
#pragma mark chapter6
int chapter6data[][128][5] = {
	{
        {40,158,226,0,0},
        {40,258,422,0,0},
        {40,54,422,0,0},
        {0,206,298,0,0},
        {0,234,358,0,0},
        {0,186,426,0,0},
        {0,126,426,0,0},
        {0,82,358,0,0},
        {0,114,294,0,0},
        {-1}
	},//1
	{
        {12,18,298,-20,0},
        {40,62,386,0,0},
        {40,254,594,0,0},
        {40,270,230,0,0},
        {12,90,270,-20,0},
        {12,178,238,-20,0},
        {12,150,403,30,0},
        {12,226,447,30,0},
        {12,290,483,30,0},
        {12,46,642,-20,0},
        {12,150,606,-20,0},
        {21,16,672,20,0},
        {21,44,662,20,0},
        {21,72,652,20,0},
        {0,78,736,0,0},
        {0,158,494,0,0},
        {0,54,554,0,0},
        {0,114,332,0,0},
        {0,198,284,0,0},
        {0,270,404,0,0},
        {0,274,790,0,0},
        {0,166,790,0,0},
        {-1}
	},//2
	{
        {40,290,499,0,0},
        {14,22,214,-90,0},
        {14,22,326,-80,0},
        {14,298,226,-80,0},
        {14,298,330,-90,0},
        {33,54,422,90,0},
        {33,54,330,90,0},
        {33,262,422,-90,0},
        {33,262,330,-90,0},
        {14,298,438,-90,0},
        {14,22,438,-80,0},
        {40,30,499,0,0},
        {40,34,642,0,0},
        {40,290,646,0,0},
        {40,34,794,0,0},
        {40,290,794,0,0},
        {33,126,258,30,0},
        {33,194,258,-30,0},
        {21,92,256,-30,0},
        {21,112,268,-30,0},
        {21,132,280,-30,0},
        {21,188,280,30,0},
        {21,208,268,30,0},
        {21,228,256,30,0},
        {14,298,278,-90,0},
        {14,298,386,-90,0},
        {14,22,270,-80,0},
        {14,22,382,-80,0},
        {0,94,502,0,0},
        {0,162,498,0,0},
        {0,230,498,0,0},
        {0,230,534,0,0},
        {0,162,566,0,0},
        {0,94,594,0,0},
        {0,94,646,0,0},
        {0,162,646,0,0},
        {0,230,646,0,0},
        {0,230,690,0,0},
        {0,162,722,0,0},
        {0,94,754,0,0},
        {0,94,802,0,0},
        {0,162,798,0,0},
        {0,230,794,0,0},
        {-1}
	},//3
	{
        {4,30,210,0,0},
        {38,126,374,0,0},
        {38,126,430,90,0},
        {38,126,430,0,0},
        {38,250,430,0,0},
        {38,190,430,90,0},
        {38,250,374,0,0},
        {38,190,374,90,0},
        {38,126,374,90,0},
        {38,250,318,0,0},
        {38,126,318,0,0},
        {38,246,262,0,0},
        {38,126,262,0,0},
        {38,250,318,90,0},
        {38,250,374,90,0},
        {38,190,318,90,0},
        {38,126,318,90,0},
        {29,158,346,0,0},
        {39,126,489,0,0},
        {39,66,545,90,0},
        {39,246,490,0,0},
        {39,250,545,90,0},
        {39,126,546,0,0},
        {39,126,546,90,0},
        {39,246,546,0,0},
        {39,190,546,90,0},
        {38,250,430,90,0},
        {38,66,428,90,0},
        {38,66,372,90,0},
        {38,66,316,90,0},
        {40,218,402,0,0},
        {40,94,290,0,0},
        {39,250,605,0,0},
        {39,126,605,0,0},
        {39,122,666,0,0},
        {39,254,665,0,0},
        {39,190,665,90,0},
        {39,250,601,90,0},
        {39,190,605,90,0},
        {39,66,605,90,0},
        {39,126,657,90,0},
        {39,66,661,90,0},
        {39,126,605,90,0},
        {39,250,665,90,0},
        {40,94,518,0,0},
        {40,98,634,0,0},
        {37,6,459,90,0},
        {40,218,634,0,0},
        {40,218,518,0,0},
        {12,38,718,-170,0},
        {20,286,446,0,0},
        {20,222,462,-90,0},
        {16,246,462,0,0},
        {16,286,422,90,0},
        {36,98,558,0,0},
        {0,30,406,0,0},
        {0,218,574,0,0},
        {0,94,402,0,0},
        {0,94,346,0,0},
        {0,218,346,0,0},
        {0,218,290,0,0},
        {0,30,342,0,0},
        {0,30,286,0,0},
        {0,286,634,0,0},
        {0,286,570,0,0},
        {0,286,514,0,0},
        {0,158,286,0,0},
        {0,158,214,0,0},
        {-1}
	},//4
	{
        {40,162,298,0,0},
        {28,262,314,10,0},
        {27,66,314,-10,0},
        {8,122,566,0,0},
        {8,58,338,0,0},
        {11,298,318,0,0},
        {26,22,358,0,0},
        {11,22,326,-10,0},
        {26,26,698,150,0},
        {12,10,714,-150,0},
        {10,78,550,70,0},
        {10,142,522,155,0},
        {10,102,610,-30,0},
        {10,166,582,-110,0},
        {40,22,498,0,0},
        {40,286,690,0,0},
        {14,86,614,-40,0},
        {10,298,362,0,0},
        {0,182,594,0,0},
        {0,282,630,0,0},
        {0,50,654,0,0},
        {0,218,364,0,0},
        {0,62,538,0,0},
        {0,282,430,0,0},
        {0,22,442,0,0},
        {0,282,534,0,0},
        {0,202,698,0,0},
        {0,138,698,0,0},
        {0,22,394,0,0},
        {0,154,498,0,0},
        {-1}
	},//5
	{
        {40,162,318,0,0},
        {40,66,318,0,0},
        {40,266,318,0,0},
        {40,278,542,0,0},
        {40,38,538,0,0},
        {40,158,678,0,0},
        {40,278,802,0,0},
        {40,38,798,0,0},
        {0,50,432,0,0},
        {0,166,432,0,0},
        {0,282,436,0,0},
        {0,126,802,0,0},
        {0,194,802,0,0},
        {0,38,702,0,0},
        {0,38,638,0,0},
        {0,282,698,0,0},
        {0,282,634,0,0},
        {0,126,538,0,0},
        {0,198,538,0,0},
        {0,222,734,0,0},
        {0,98,730,0,0},
        {0,102,606,0,0},
        {0,226,610,0,0},
        {-1}
	},//6
	{
        {12,94,246,-90,0},
        {12,178,322,180,0},
        {12,222,242,0,0},
        {10,122,294,-185,0},
        {10,286,274,0,0},
        {40,270,282,0,0},
        {10,278,394,90,0},
        {12,178,336,-10,0},
        {12,310,330,90,0},
        {12,106,348,-10,0},
        {12,186,418,180,0},
        {40,54,400,0,0},
        {10,34,388,-105,0},
        {28,274,480,10,0},
        {12,142,508,-10,0},
        {10,34,564,-180,0},
        {12,10,476,-90,0},
        {12,110,588,-190,0},
        {11,190,476,280,0},
        {11,310,500,30,0},
        {16,290,444,-80,0},
        {16,250,436,-80,0},
        {21,278,464,-10,0},
        {21,238,456,-10,0},
        {21,258,460,-10,0},
        {12,26,620,-20,0},
        {12,106,600,-10,0},
        {40,286,806,0,0},
        {12,206,770,0,0},
        {12,110,468,110,0},
        {11,202,444,-80,0},
        {12,230,726,-120,0},
        {10,18,814,-180,0},
        {12,182,726,120,0},
        {21,17,643,20,0},
        {21,114,618,10,0},
        {21,66,626,20,0},
        {40,34,806,0,0},
        {0,122,810,0,0},
        {0,190,810,0,0},
        {0,94,630,0,0},
        {0,154,710,0,0},
        {0,42,642,0,0},
        {0,134,282,0,0},
        {0,202,282,0,0},
        {0,270,382,0,0},
        {0,122,382,0,0},
        {0,198,382,0,0},
        {-1}
	},//7
	{
        {38,110,298,0,0},
        {38,178,298,0,0},
        {38,246,298,0,0},
        {38,60,413,0,0},
        {38,122,413,0,0},
        {38,187,413,0,0},
        {38,252,413,0,0},
        {38,314,298,0,0},
        {40,30,350,0,0},
        {40,214,266,0,0},
        {12,310,358,90,0},
        {21,290,384,-90,0},
        {21,290,398,-90,0},
        {21,290,328,-90,0},
        {21,290,312,-90,0},
        {38,314,413,0,0},
        {40,154,454,0,0},
        {28,178,234,0,0},
        {27,62,234,0,0},
        {36,298,355,-90,0},
        {40,246,582,0,0},
        {40,38,674,0,0},
        {39,130,650,180,0},
        {39,194,654,270,0},
        {39,122,710,90,0},
        {39,186,714,0,0},
        {33,6,582,-90,0},
        {37,14,582,90,0},
        {21,22,616,90,0},
        {21,22,600,90,0},
        {21,22,564,90,0},
        {21,22,548,90,0},
        {12,302,286,20,0},
        {38,42,246,-40,0},
        {0,210,354,0,0},
        {0,122,354,0,0},
        {0,130,586,0,0},
        {0,158,682,0,0},
        {0,190,586,0,0},
        {0,218,534,0,0},
        {0,194,498,0,0},
        {0,62,622,0,0},
        {0,94,562,0,0},
        {0,126,506,0,0},
        {0,246,670,0,0},
        {-1}
	},//8
	{
        {12,6,306,-90,0},
        {12,6,418,-90,0},
        {12,6,530,-90,0},
        {12,70,594,-180,0},
        {12,166,594,-180,0},
        {12,250,594,-180,0},
        {12,314,530,90,0},
        {12,314,414,90,0},
        {12,314,310,90,0},
        {21,30,576,180,0},
        {21,50,576,180,0},
        {21,70,576,180,0},
        {21,90,576,180,0},
        {21,110,576,180,0},
        {21,130,576,180,0},
        {21,150,576,180,0},
        {21,190,576,180,0},
        {21,212,576,180,0},
        {21,234,576,180,0},
        {21,256,576,180,0},
        {21,278,576,180,0},
        {21,298,576,180,0},
        {21,170,576,180,0},
        {21,25,563,90,0},
        {21,25,543,90,0},
        {21,25,521,90,0},
        {21,25,499,90,0},
        {21,25,475,90,0},
        {21,25,451,90,0},
        {21,25,427,90,0},
        {21,25,405,90,0},
        {21,25,381,90,0},
        {21,25,357,90,0},
        {21,25,335,90,0},
        {21,25,311,90,0},
        {21,25,287,90,0},
        {21,25,263,90,0},
        {21,295,557,-90,0},
        {21,295,533,-90,0},
        {21,295,509,-90,0},
        {21,295,485,-90,0},
        {21,295,461,-90,0},
        {21,295,437,-90,0},
        {21,295,413,-90,0},
        {21,295,389,-90,0},
        {21,295,365,-90,0},
        {21,295,341,-90,0},
        {21,295,317,-90,0},
        {21,295,293,-90,0},
        {21,295,269,-90,0},
        {40,158,258,0,0},
        {40,262,398,0,0},
        {40,58,542,0,0},
        {40,58,398,0,0},
        {8,114,450,0,0},
        {8,162,502,0,0},
        {8,110,330,0,0},
        {2,62,210,90,0},
        {0,130,482,0,0},
        {0,186,446,0,0},
        {0,194,298,0,0},
        {0,226,338,0,0},
        {0,262,446,0,0},
        {0,262,494,0,0},
        {0,262,542,0,0},
        {0,210,542,0,0},
        {0,158,542,0,0},
        {0,110,542,0,0},
        {0,58,486,0,0},
        {0,58,450,0,0},
        {0,58,342,0,0},
        {0,58,246,0,0},
        {0,58,294,0,0},
        {-1}
	},//9
	{
        {40,290,202,0,0},
        {28,162,214,10,0},
        {27,46,214,-10,0},
        {33,258,294,90,0},
        {33,258,374,90,0},
        {38,318,494,-40,0},
        {39,318,714,-40,0},
        {11,2,242,-60,0},
        {36,98,496,180,0},
        {15,98,512,180,0},
        {6,98,464,0,0},
        {6,98,440,0,0},
        {6,98,452,0,0},
        {33,258,436,90,0},
        {11,226,206,-40,0},
        {11,202,210,0,0},
        {39,262,603,90,0},
        {39,262,671,90,0},
        {39,266,750,0,0},
        {39,198,750,0,0},
        {39,130,750,0,0},
        {39,62,750,0,0},
        {40,130,578,0,0},
        {6,54,338,0,0},
        {6,38,362,60,0},
        {6,70,362,120,0},
        {6,154,378,0,0},
        {6,138,354,120,0},
        {6,166,354,-120,0},
        {37,130,738,180,0},
        {40,30,706,0,0},
        {40,230,710,0,0},
        {6,130,694,0,0},
        {6,130,682,0,0},
        {6,170,722,-90,0},
        {6,158,722,-90,0},
        {6,102,722,90,0},
        {6,90,722,90,0},
        {38,126,524,90,0},
        {38,70,524,90,0},
        {33,42,536,0,0},
        {33,130,536,0,0},
        {33,218,536,0,0},
        {21,9,552,0,0},
        {21,31,552,0,0},
        {21,53,552,0,0},
        {21,75,552,0,0},
        {21,99,552,0,0},
        {21,120,551,0,0},
        {21,142,551,0,0},
        {21,164,551,0,0},
        {21,187,552,0,0},
        {21,207,552,0,0},
        {21,227,552,0,0},
        {21,247,552,0,0},
        {10,290,814,85,0},
        {10,22,810,180,0},
        {0,294,578,0,0},
        {0,294,630,0,0},
        {0,294,455,0,0},
        {0,294,396,0,0},
        {0,294,336,0,0},
        {0,54,358,0,0},
        {0,150,362,0,0},
        {0,294,282,0,0},
        {0,58,662,0,0},
        {0,94,618,0,0},
        {0,206,666,0,0},
        {0,170,618,0,0},
        {0,34,794,0,0},
        {0,198,794,0,0},
        {0,114,794,0,0},
        {0,278,798,0,0},
        {-1}
	},//10
	{
        {24,106,545,50,0},
        {24,34,530,50,0},
        {40,262,806,0,0},
        {10,294,822,90,0},
        {33,270,714,90,0},
        {33,270,634,90,0},
        {33,270,554,90,0},
        {33,270,478,90,0},
        {33,270,399,90,0},
        {33,270,319,90,0},
        {33,270,239,90,0},
        {40,290,158,0,0},
        {12,30,238,-20,0},
        {12,106,210,-20,0},
        {12,194,178,-20,0},
        {33,70,738,90,0},
        {33,138,702,90,0},
        {33,202,678,90,0},
        {8,102,610,0,0},
        {8,166,582,0,0},
        {8,226,597,0,0},
        {8,34,586,0,0},
        {24,190,530,-130,0},
        {14,298,417,-90,0},
        {14,298,530,-90,0},
        {14,298,654,-90,0},
        {6,42,638,40,0},
        {6,106,650,-40,0},
        {6,170,642,40,0},
        {6,238,642,-40,0},
        {8,42,458,0,0},
        {8,130,458,0,0},
        {8,206,458,0,0},
        {4,214,330,0,0},
        {4,162,398,0,0},
        {21,16,276,20,0},
        {21,36,268,20,0},
        {21,56,262,20,0},
        {33,34,252,-20,0},
        {28,110,399,0,0},
        {25,94,238,20,0},
        {25,250,487,-90,0},
        {14,298,754,-100,0},
        {14,298,314,-90,0},
        {28,250,418,90,0},
        {0,86,439,0,0},
        {0,214,538,0,0},
        {0,102,710,0,0},
        {0,170,690,0,0},
        {0,234,686,0,0},
        {0,34,754,0,0},
        {0,66,614,0,0},
        {0,190,610,0,0},
        {0,78,526,0,0},
        {0,150,530,0,0},
        {0,130,594,0,0},
        {0,166,439,0,0},
        {0,38,338,0,0},
        {0,106,334,0,0},
        {0,178,334,0,0},
        {0,246,334,0,0},
        {-1}
	},//11
	{
        {40,38,377,0,0},
        {40,290,596,0,0},
        {40,42,514,0,0},
        {40,42,650,0,0},
        {40,46,798,0,0},
        {8,82,475,0,0},
        {8,130,591,0,0},
        {33,66,441,90,0},
        {33,66,581,90,0},
        {33,66,726,90,0},
        {12,130,750,-10,0},
        {12,194,738,-10,0},
        {11,234,710,-100,0},
        {37,246,806,-90,0},
        {12,258,830,90,0},
        {21,238,826,-90,0},
        {21,238,786,-90,0},
        {39,130,630,10,0},
        {12,198,638,10,0},
        {12,146,573,90,0},
        {12,146,489,90,0},
        {28,78,366,200,0},
        {38,314,662,10,0},
        {12,186,306,-20,0},
        {36,134,511,-90,0},
        {21,127,530,-90,0},
        {21,127,492,-90,0},
        {12,262,246,20,0},
        {4,278,292,0,0},
        {11,238,544,0,0},
        {12,258,500,-90,0},
        {12,218,500,90,0},
        {11,238,388,-180,0},
        {12,258,432,-90,0},
        {12,218,428,90,0},
        {2,174,610,130,0},
        {12,182,198,-30,0},
        {0,162,807,0,0},
        {0,294,502,0,0},
        {0,294,426,0,0},
        {0,294,818,0,0},
        {0,294,750,0,0},
        {0,294,686,0,0},
        {0,194,670,0,0},
        {0,106,654,0,0},
        {0,294,346,0,0},
        {0,182,538,0,0},
        {0,182,486,0,0},
        {0,182,426,0,0},
        {0,222,262,0,0},
        {0,166,242,0,0},
        {0,226,202,0,0},
        {0,286,166,0,0},
        {-1}
	},//12
	{
        {27,86,278,0,0},
        {14,46,238,-30,0},
        {14,126,234,-30,0},
        {14,150,306,-190,0},
        {14,50,302,-240,0},
        {14,98,206,-90,0},
        {14,178,258,-130,0},
        {10,186,238,0,0},
        {10,30,235,-95,0},
        {40,210,678,0,0},
        {40,22,474,0,0},
        {33,66,470,270,0},
        {33,250,798,-90,0},
        {33,26,577,40,0},
        {40,282,638,0,0},
        {33,138,394,0,0},
        {35,82,410,-90,0},
        {35,194,378,90,0},
        {33,210,322,90,0},
        {28,198,459,0,0},
        {38,266,491,20,0},
        {40,146,722,0,0},
        {33,186,798,-90,0},
        {12,266,838,-180,0},
        {36,286,826,180,0},
        {37,150,826,180,0},
        {39,314,678,0,0},
        {21,202,818,180,0},
        {21,218,818,180,0},
        {21,234,818,180,0},
        {2,30,630,50,0},
        {38,322,511,20,0},
        {12,70,782,90,0},
        {12,110,782,-90,0},
        {11,90,738,180,0},
        {12,54,838,180,0},
        {33,250,718,-90,0},
        {38,246,754,0,0},
        {12,162,838,180,0},
        {8,250,315,0,0},
        {8,250,427,0,0},
        {8,286,363,0,0},
        {33,98,483,-40,0},
        {33,154,435,-40,0},
        {34,186,399,-90,0},
        {28,278,214,0,0},
        {11,318,218,10,0},
        {0,250,367,0,0},
        {0,30,790,0,0},
        {0,286,714,0,0},
        {0,178,550,0,0},
        {0,258,578,0,0},
        {0,290,280,0,0},
        {0,30,538,0,0},
        {0,218,790,0,0},
        {0,286,790,0,0},
        {0,150,790,0,0},
        {0,290,447,0,0},
        {0,214,412,0,0},
        {0,251,255,0,0},
        {-1}
	},//13
	{
        {40,162,318,0,0},
        {40,294,483,0,0},
        {40,26,479,0,0},
        {40,158,636,0,0},
        {33,154,482,-40,0},
        {38,258,446,0,0},
        {38,202,366,-180,0},
        {38,270,434,90,0},
        {38,190,378,-90,0},
        {33,298,310,40,0},
        {39,114,446,0,0},
        {39,58,366,-180,0},
        {39,126,434,90,0},
        {39,46,378,-90,0},
        {39,202,519,180,0},
        {39,258,599,0,0},
        {39,190,531,-90,0},
        {39,270,587,90,0},
        {38,46,531,-90,0},
        {38,58,519,-180,0},
        {38,126,587,90,0},
        {38,114,599,0,0},
        {33,18,317,-40,0},
        {38,202,674,-180,0},
        {38,190,686,270,0},
        {38,258,754,0,0},
        {38,270,742,90,0},
        {39,46,686,270,0},
        {39,58,674,180,0},
        {39,114,754,0,0},
        {39,126,742,90,0},
        {33,302,634,40,0},
        {33,18,646,220,0},
        {37,154,786,140,0},
        {36,86,399,0,0},
        {40,290,786,0,0},
        {33,150,794,220,0},
        {12,238,830,180,0},
        {12,310,830,180,0},
        {35,54,794,-220,0},
        {35,14,758,220,0},
        {34,90,790,150,0},
        {34,110,778,150,0},
        {34,18,722,-60,0},
        {34,30,702,-60,0},
        {34,42,682,-60,0},
        {0,158,558,0,0},
        {0,298,398,0,0},
        {0,226,474,0,0},
        {0,158,398,0,0},
        {0,86,479,0,0},
        {0,22,398,0,0},
        {0,86,320,0,0},
        {0,230,320,0,0},
        {0,86,560,0,0},
        {0,230,556,0,0},
        {0,230,404,0,0},
        {0,34,770,0,0},
        {0,86,714,0,0},
        {0,230,714,0,0},
        {0,230,634,0,0},
        {0,86,634,0,0},
        {0,298,714,0,0},
        {0,158,714,0,0},
        {0,22,558,0,0},
        {-1}
	},//14
	{
        {28,226,234,40,0},
        {27,90,234,-40,0},
        {11,212,318,0,0},
        {8,158,170,0,0},
        {40,294,220,0,0},
        {4,22,237,0,0},
        {16,254,254,130,0},
        {16,62,254,50,0},
        {33,270,302,90,0},
        {33,270,387,90,0},
        {33,270,471,90,0},
        {10,294,806,90,0},
        {33,270,550,90,0},
        {33,270,626,90,0},
        {8,126,638,0,0},
        {8,86,538,0,0},
        {8,222,598,0,0},
        {8,34,598,0,0},
        {8,166,538,0,0},
        {33,270,706,90,0},
        {26,174,734,0,0},
        {26,78,734,0,0},
        {35,82,786,90,0},
        {35,166,786,-180,0},
        {16,78,710,90,0},
        {16,174,710,90,0},
        {10,22,802,-185,0},
        {12,114,830,180,0},
        {12,202,830,180,0},
        {38,6,410,130,0},
        {36,210,344,-10,0},
        {33,46,314,-90,0},
        {40,122,790,0,0},
        {0,62,412,0,0},
        {0,178,448,0,0},
        {0,114,448,0,0},
        {0,230,404,0,0},
        {0,114,380,0,0},
        {0,142,316,0,0},
        {0,82,602,0,0},
        {0,114,602,0,0},
        {0,146,602,0,0},
        {0,178,602,0,0},
        {0,202,562,0,0},
        {0,122,526,0,0},
        {0,58,566,0,0},
        {0,174,678,0,0},
        {0,82,678,0,0},
        {0,34,770,0,0},
        {0,214,770,0,0},
        {0,178,376,0,0},
        {-1}
	}//15
};

int chapter6height[] = {
	0, 3, 3, 2, 2,
    3, 3, 2, 1, 3,
    3, 3, 3, 3, 3
};

int chapter6time[] = {
	10, 35, 30, 45, 20, 
	25, 25, 50, 30, 70, 
	90, 40, 50, 45, 60
};

LevelMaker::~LevelMaker()
{
    
}
LevelMaker::LevelMaker(b2World* _world, CCSize _worldSize)
{
    world = _world;
    worldSize = _worldSize;
}

int LevelMaker::getChapterData(int chapter, int stage, int cnt, int type)
{
    switch(chapter)
    {
        case 0: return chapter1data[stage][cnt][type];
        case 1: return chapter2data[stage][cnt][type];
        case 2: return chapter3data[stage][cnt][type];
        case 3: return chapter4data[stage][cnt][type];
        case 4: return chapter5data[stage][cnt][type];
        case 5: return chapter6data[stage][cnt][type];
    }
}

int LevelMaker::getLevelHeight(int chapter, int stage)
{
    switch(chapter)
    {
        case 0: return chapter1height[stage];
        case 1: return chapter2height[stage];
        case 2: return chapter3height[stage];
        case 3: return chapter4height[stage];
        case 4: return chapter5height[stage];
        case 5: return chapter6height[stage];
			
    }
}


int LevelMaker::getMaxStage(int chapter)
{
    return 15;
}

